Assume we have the following arrays of objects to be compared based on property id:
id
a = [{\'id\':\'1\', \'name\':\'a1\'}, {\'id\':\'2\', \'name\':\'
Second and Third way are more performant i guess....
a.filter(i => !b.filter(y => y.id === i.id).length); // One Way a.filter(i => !b.find(f => f.id === i.id)); // Second Way a.filter(i => b.findIndex(f => f.id === i.id)) // Third Way