I am faced with a challenge involving two arrays:
arr1 = [{
id: 1,
name: 'Diego',
age: 23
}, {
id: 2,
name: 'Brian',
age: 18
}]
arr2 = [{
id: 1,
name: 'Diego',
age: 23
}, {
id: 2,
name: 'Brian',
age: 18
}, {
id: 3,
name: 'Pikachu',
age: 88
}]
My goal is to find the difference between these arrays, resulting in:
arr3 [{id:3, name: 'Pikachu', age: 88}]
Is there a solution to this problem using ES6
or TypeScript
?
I attempted to use SET, but unfortunately, it did not work as expected.