Horje
get the latest field in mongodb collection Code Example
mongodb shell query last document
db.collection.find().limit(1).sort({$natural:-1})
get the latest field in mongodb collection
> db.collection.findOne().sort({'_id':-1}).limit(1)

It work perfectly !
get the latest field in mongodb collection
db.collection.find().limit(1).sort({$natural:-1})




C

Related
sum average min max in c array Code Example sum average min max in c array Code Example
c convert char to int Code Example c convert char to int Code Example
binary to decimal in c Code Example binary to decimal in c Code Example
check email id valid or not without using regex in javascript Code Example check email id valid or not without using regex in javascript Code Example
while loop Code Example while loop Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8