Confusing title, the only simple way to explain is to show you what I'm after :
var user = [
{foo:"test",bar:1},
{foo:"test2",bar:2}
];
var items = [{foo:"test",bar:1},{foo:"test4",bar:4},{foo:"test5",bar:5}]
What I want, is to pick one item from items which is not already in user, and add it to user. In this case the user object would end up looking like :
user = [
{foo:"test",bar:1},
{foo:"test2",bar:2},
{foo:"test4",bar:4}
];
I've tried all sorts of _.filter, _.contains, etc... combinations, but can't quite figure it out. Any help would be very appreciated!
test4but nottest5?