我有这样一个数组:
var foo = [ { "a" : "1" }, { "b" : "2" }, { "a" : "1" } ];
我想过滤一下:
var bar = [ { "a" : "1" }, { "b" : "2" }];
I tried using _.uniq, but I guess because { "a" : "1" }
is not equal to itself, it doesn't work. Is there any way to provide underscore uniq with an overriden equals function?