I am doing like this, this is my code to know if there are duplicates
const value = 'a'
const value2 = 'c'
const arr = [{
name: 'a'
}, {
name: 'b'
}]
const result = arr.filter((d) => d.name === value).length !== 1
console.log(result)
const result2 = arr.filter((d) => d.name === value2).length !== 1
console.log(result2)
there is another way to do this properly? with .some(), .includes or other functions, i think my function its hard
note: arr contains objects