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
Use this in mongoose
let ObjectId = require('mongodb').ObjectID; Property.find({ _id: { $gt: ObjectId.createFromTime(Date.now() / 1000 - 24 * 60 * 60) } }, (err, result) => { console.log(err || result); });