var firstOne = [
{ id: 22, value: 'hi there' },
{ id: 28, value: 'here' },
{ id: 77, value: 'what' }
];
var secondOne = [
{ id: 2, value: 'bond' },
{ id: 8, value: 'foobar' },
{ id: 87, value: 'what' }
];
I'm looking for the best approach to compare two arrays of objects by value. If value is same in both, then remove it from firstOne which would result in:
var firstOne = [
{ id: 22, value: 'hi there' },
{ id: 28, value: 'here' }
];
var secondOne = [
{ id: 2, value: 'bond' },
{ id: 8, value: 'foobar' },
{ id: 87, value: 'what' }
];
Javascript or Angular solutions would be appreciated. Thanks