title: How to use underscore's "intersection" on objects?
body: <pre><code>_.intersection([], [])
  </code></pre>
  
  <p>only works with primitive types, right?</p>
  
  <p>It doesn't work with objects.  How can I make it work with objects (maybe by checking the "Id" field)?</p>
  
  <pre><code>var a = [ {'id': 1, 'name': 'jake' }, {'id':4, 'name': 'jenny'} ]
  var b = [ {'id': 1, 'name': 'jake' }, {'id': 9, 'name': 'nick'} ]
  </code></pre>
  
  <p>In this example, the result should be: </p>
  
  <pre><code>_.intersection(a, b);
  </code></pre>
  
  <blockquote>
    <blockquote>
      <blockquote>
        <p>[ {'id': 1, 'name': 'jake' } ];</p>
      </blockquote>
    </blockquote>
  </blockquote>