title: Filter a collection by multiple attributes
body: <p>I'm using underscore's filter method to retrieve the models I need within a collection. Here's my code so far:</p>
  
  <pre><code>search = {'name':'Jordan', 'country':'Brazil'};
  
  var people = this.filter(function(person){
  
      return person.get('name') == search['name']
      &amp;&amp; person.get('country') == search['country'];
  });
  </code></pre>
  
  <p>My problem is, I don't know how many key/value pairs I will receive in the search object. A simple solution would be something like this:</p>
  
  <pre><code>search = {'name':'Jordan', 'country':'Brazil'};
  
  var people = this.filter(function(person){
  
      for(var key in search)
      {
          if(search.hasOwnProperty(key)) return person.get(key) == search[key];
      }
  });
  </code></pre>
  
  <p>But of course it does not work. What can I do?</p>
  
  <p>Edit: </p>
  
  <p>The keys I get in the search object are not necessarily attributes of the models I am filtering. I might receive <code>search = {'name':'Jordan', 'country':'Brazil', 'parentName': 'Steve'};</code></p>
  
  <p>So one of the filter conditions would be <code>Parents.byID(person.get('parentID')).get('name') == search['parentName'];</code></p>