const arrayOne = [
{ id: 22, value: 'hello' },
{ id: 33, value: 'there' },
{ id: 44, value: 'apple' }
];
const arrayTwo = [
{ id: 55, value: 'world' },
{ id: 66, value: 'banana' },
{ id: 77, value: 'apple' }
];
I need help figuring out the most efficient way to compare two arrays of objects by their values. If the value exists in both arrays, I want to remove it from arrayOne resulting in:
const arrayOne = [
{ id: 22, value: 'hello' },
{ id: 33, value: 'there' }
];
const arrayTwo = [
{ id: 55, value: 'world' },
{ id: 66, value: 'banana' },
{ id: 77, value: 'apple' }
];
Suggestions using JavaScript or Angular would be greatly appreciated. Thank you!