title: Using findWhere with nested objects in an array
body: <p>I have a data structure that looks like this</p>
  
  <pre><code>var foo = [
      {
          bar: {
              something: 123
          },
          baz: {
              somethingElse: 321
          }
      },
      {
          bar: {
              something: 444
          },
          baz: {
              somethingElse: 555
          }
      }
  ];
  </code></pre>
  
  <p>I then have a variable:</p>
  
  <pre><code>var findMe = 444;
  </code></pre>
  
  <p>I'd like to search through my <code>foo</code> data structure (an array of objects) to see if <code>findMe</code> matches the <code>bar.something</code> property of any of the objects inside the <code>foo</code> array.</p>
  
  <p>Using underscore.js, I would have thought the following code snippet would do the trick:</p>
  
  <pre><code>var _ = require('underscore');
  var thingImLookingFor = _.findWhere(foo, {bar.something: findMe});
  </code></pre>
  
  <p>However that produces a syntax error in my application:</p>
  
  <p><code>Uncaught SyntaxError: Unexpected token .</code></p>
  
  <p>Is anyone able to shed some light on how I can achieve the search I'm looking for?</p>
  
  <p>Thanks!</p>