I have many documents with the following structure:
{
_id: ObjectId("519af935c1a9f8094f0002aa"),
messages: [{
message: "Message A",
timestamp: 1369130219638
},
{
message: "Message B",
timestamp: 1369130249638
},
{
message: "Message C",
timestamp: 1369130291638
}
]
}
...and I don't know how to query all documents that have the last message posted more than 1 hour ago. Something like: get all documents where timestamp < now() - 3600 where now() is the current timestamp.
Any ideas?