Is there a way to find the variance between two sets of objects in Javascript? For example:
var obj1[0] = { name : 'test1' , type : 'test2' };
var obj1[1] = { name : 'test2' , type : 'test3' };
var obj2[0] = { name : 'test1' , type : 'test2' };
var obj2[1] = { name : 'test3' , type : 'test4' };
I am looking to output something like this:
If Intersection() :
obj3[0] = { name : 'test1' , type : 'test2' }
If difference obj1-obj2 :
obj4[0] = { name : 'test2' , type : 'test3' };
If difference obj2-obj1 :
obj5[0] = { name : 'test3' , type : 'test4' };
My search has not yielded any results related to associative arrays.