Answers for "mongodb find all elements in array with limit and sort"

1

how to sort and limit the result using mongodb

db.Employee.find().limit(2).sort({age:-1})
Posted by: Guest on May-05-2021
1

how to sort and limit the result using mongodb

for more information see this 
https://www.guru99.com/mongodb-query-modifications-using-limit-sort.html
Posted by: Guest on May-05-2021

Code answers related to "mongodb find all elements in array with limit and sort"

Browse Popular Code Answers by Language