Date query with ISODate in mongodb doesn’t seem to work

I don’t seem to be able to get even the most basic date query to work in MongoDB. With a document that looks something like this: { “_id” : “foobar/201310”, “ap” : “foobar”, “dt” : ISODate(“2013-10-01T00:00:00.000Z”), “tl” : 375439 } And a query that looks like this: { “dt” : { “$gte” : { “$date” … Read more

How to query nested objects?

I have a problem when querying mongoDB with nested objects notation: db.messages.find( { headers : { From: “[email protected]” } } ).count() 0 db.messages.find( { ‘headers.From’: “[email protected]” } ).count() 5 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 … Read more