1db.messages.find( { headers : { From: "reservations@marriott.com" } } )
2
3This queries for documents where headers equals { From: ... }, i.e. contains no other fields.
4
5db.messages.find( { 'headers.From': "reservations@marriott.com" } )
6
7This only looks at the headers.From field, not affected by other fields contained in, or missing from, headers.