const obj = { firstName: 'Jean-Luc', lastName: 'Picard', age: 59 }; // { firstName: 'Jean-Luc', lastName: 'Picard' } Object.fromEntries(Object.entries(obj).filter(([key]) => key.includes('Name')));