```
_.intersection([], [])

```

only works with primitive types, right?

It doesn't work with objects. How can I make it work with objects (maybe by checking the "Id" field)?

```
var a = [ {'id': 1, 'name': 'jake' }, {'id':4, 'name': 'jenny'} ]
var b = [ {'id': 1, 'name': 'jake' }, {'id': 9, 'name': 'nick'} ]

```

In this example, the result should be: 

```
_.intersection(a, b);

```

> 
> 
> > 
> > 
> > > 
> > > [ {'id': 1, 'name': 'jake' } ];
> > > 
> > > 
> > > 
> > 
> > 
> > 
> 
> 
>