I have an array of objects list.data
that contains about 2000 objects. I have other array docs
that has one object that already exists in the list.data
array. I would like to find duplicate/duplicates and remove them from the docs
array. The object is a duplicate if it has same values saved in three properties (name, quizmaster, file). Otherwise it is not duplicate.
So far I have tried this code:
const filtered = docs.filter(doc => list.data.some(el => doc.name !== el.name && doc.quizmaster !== el.quizmaster && doc.file !== el.file));
Any suggestions what am I doing wrong?
Thank you in advance