So after searching the interwebz for a few hours I have not found the solution I am looking for.
I have two arrays that contain game objects with a lot of informatio
Here is better solution
function arrayUnion() {
var args = Array.prototype.slice.call(arguments);
var it = args.pop();
return _.uniq(_.flatten(args, true), it);
}
var a = [{id: 0}, {id: 1}, {id: 2}];
var b = [{id: 2}, {id: 3}];
var c = [{id: 0}, {id: 1}, {id: 2}];
var result = arrayUnion(a, b, c, function (item) {
return item.id;
});
console.log(result);