title: checking if javascript array contains value using underscorejs
body: <p>I have an array of cars like this:</p>
  
  <pre><code>[{ name:"Toyota Minivan", id:"506" }, { name:"Honda Civic", id:"619" }]
  </code></pre>
  
  <p>I am trying to check whether the array contains a certain id.</p>
  
  <p>I have tried</p>
  
  <pre><code>var x =!!_.where(cars, {id:'506'}).length;
  </code></pre>
  
  <p>expecting it to return true if the array contains the id, but it always returns false.</p>
  
  <p>What am I doing here ?</p>
  
  <p>Btw, I don't have to use underscore.js if there is a better way of doing this.</p>
  
  <p>thanks
  Thomas</p>