Check out example codes for "get the latest field in mongodb collection". It will help you in understanding the concepts better.

Code Example 1

db.collection.find().limit(1).sort({$natural:-1})

Code Example 2

> db.collection.findOne().sort({'_id':-1}).limit(1)

It work perfectly !

Code Example 3

db.collection.find().limit(1).sort({$natural:-1})

Learn ReactJs, React Native from akashmittal.com