title: Pymongo: Querying specific list elements within a Mongo document
body: <p>I asked a previous question related to this <a href="https://stackoverflow.com/questions/36439892/querying-for-array-in-embedded-list/36439936#36439936">here</a> but let's say I have a document that looks like the following:</p>
  
  <pre><code>{
     'foo':1
     'listOfLists' : [ [1,2],[3,4],.... ]
  }
  </code></pre>
  
  <p>How could I got about querying to see if the first element of an entry in the listOfLists field matches a certain value? From my previous question</p>
  
  <pre><code>collection.find({'listOfLists' : {'$elemMatch' : {'$eq': [3,4] } } })
  </code></pre>
  
  <p>would match the document, but what if I only wanted to check if the first element was a 3? The previous question did inform me that for direct matches, I don't need to use <code>$elemMatch</code> but could I do just the first element check using it? Perhaps something like</p>
  
  <pre><code>collection.find({'listOfLists' : {'$elemMatch' : 3 } })
  </code></pre>
  
  <p>This shouldn't work, I would think, because it would be trying to compare a list to an integer at that point. Any ideas? Thanks.</p>