I have searched StackOverflow and found this answer, but it does not solve my problem.
My problem is, my array is like this:
let arr = [
{type: 1, id: 1, name:'aa'},
{type: 1, id: 1, name:'bb'},
{type: 2, id: 1, name:'cc'}
]
And I need to find same type and same id and then recognize that this is duplicate object. Above, arr[0] and arr[1] is a duplicate but arr[0] and arr[2] are not. I have tried using ES6 methods such as .some(), .every(), and a Set(), but non of these have worked for me. How can I solve this problem?