title: underscore.js: key comparision using _.where
body: <p>what if i want to find an object which has same timestamp as my varibale's timestamp in undescore js using _.where.</p>
  
  <p>I have array named data and i want to check that key2.$subkey equals "2014-01-27T16:50:33.035Z" or not.</p>
  
  <p>Following is code for the same.</p>
  
  <pre><code> var data=[{{key1":"key1"},{ "key2" : { "$subkey" : "2014-01-27T16:50:33.035Z"}}},  {{key1":"key1"},{ "key2" : { "$subkey" : "2014-01-27T12:50:33.035Z"}}}];
  
   var match=_.where(data,{key2.$subkey="2014-01-27T16:50:33.035Z"})
  </code></pre>
  
  <p>how to compare to a key which itself is an object using underscorejs</p>