Identify last document in MongoDB using find()

Here is a quick snippet to find the last document in MongoDB.

db.collection.find().sort( { _id : -1 } ).limit(1);