Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

mongodb shell query last document

db.collection.find().limit(1).sort({$natural:-1})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mongodb #shell #query #document
ADD COMMENT
Topic
Name
4+6 =