I want to limit a query I\'m making to only look in documents that were created in the past 24 hrs.
What is the best way to structure this query? How do I go about
For anyone else landing here via google, you can do this in the mongo shell as follows:
db.collection.find({ $where: function () { return Date.now() - this._id.getTimestamp() < (24 * 60 * 60 * 1000) } })