I have a Document which looks like this
{
"2014" : {
"11" : {
"20" : {
"Counts" : {
"c" : 2
}
},
"21" : {
"Counts" : {
"c" : 20
}
},
"22" : {
"Counts" : {
"c" : 27
}
}
}
},
"_id" : "53d6883a2dc307560d000004",
"createdate" : ISODate("2014-11-21T07:15:26.109Z")
}
which is basically keeping a count on the year{month{day{counts{c=countval}}} structure, How do i do a find of data on a date range like returning counts on between 21 and 22 november
I tried something like this
db.installObjs.find({"2014.11.20.Counts.c":{$ne:null}},{"2014.11.20.Counts.c":1})
but as you can see it works for a certain date only