const values = [ { name: 'someName1' }, { name: 'someName2' }, { name: 'someName3' }, { name: 'someName1' } ] const uniqueValues = new Set(values.map(v => v.name)); if (uniqueValues.size < values.length) { console.log('uniqueValues') }