I am currently using
db.<collection_name>.find({}).sort({"_id":-1})
Is this the right way to go ?
I am currently using
db.<collection_name>.find({}).sort({"_id":-1})
Is this the right way to go ?
Hi @Stuart_S,
Yes, you can do it like that. _id
filed is of the type ObjectId, which includes a timestamp.
Thanks Nenad,!!!
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.