title: How to query nested objects?
body: <p>I have a problem when querying mongoDB with nested objects notation:</p>
  
  <pre><code>db.messages.find( { headers : { From: "reservations@marriott.com" } } ).count()
  0
  db.messages.find( { 'headers.From': "reservations@marriott.com" }  ).count()
  5
  </code></pre>
  
  <p>I can't see what I am doing wrong. I am expecting nested object notation to return the same result as the dot notation query. Where am I wrong?</p>