I have two object arrays :
first = [
{ "id": "15", "name": "raza" },
{ "id": "1", "name": "sahir" },
{ "id": "54", "name": "ayyan" },
{ "id": "3", "name": "tahir" },
];
second = [
{ "id": "15", "name": "razi" },
{ "id": "3", "name": "qasim" },
{ "id": "1", "name": "taha" },
];
I want to get unmatched objects from "first" array on the basis of their id, something like
const result = this.first.filter(e => this.second.some(({id}) => e.id ==id ));
It gives me matched objects but I want to get unmatched objects.