I have on array of object, which looks like the following :
var arrayOfObjects = [
{
key_a : "value1",
key_b : "value2"
},
{
key_c : "value12",
key_d : "value23"
}
];
Now, I have another object :
var objToCompare = {
key_a : "value1",
key_b : "value2"
};
What are the possible ways to compare 'objToCompare' with 'arrayOfObjects' and remove the matching objects from 'arrayOfObjects' -- using javascript or underscore js or lodash?
So, the resultant array of object would look like :
var arrayOfObjects = [
{
key_c : "value12",
key_d : "value23"
}
];
*The object should only be removed from the array of objects, when all the properties are matched.