How to get documents where KEY is greater than X
i am recording user's daily usage of my platform.
structures of documents in mongodb are like that:
_id: X
day1:{
loginCount = 4
someDict { x:y, z:m }
}
day2:{
loginCount = 5
someDict { a:b, c:d }
}
then, i need to get last 2 day's user stats which belongs to user -lets
say- X.
is my design wrong? or is there way to get values like using '$gte' command?
No comments:
Post a Comment