If i have 2 arrays with (JSON) objects and i want to compare them and splice an object when there is a match what is the best way to do this.
Example:
Array 1:
[{test: 1, test2: 2}, {test: 3, test2: 5}, {test: 6, test2: 8}]
Array 2:
[{test: 6, test2: 8}, {test: 1, test2: 2}]
Now we see that Array 1 index 0 and Array 2 index 1 are a match. What I want to do now is splice the object from array 1.
Is there a good/smart way to achieve this?
thx!