How do I sort records in mongodb?
beginer
1544
Points
52
Posts
|
Answers
Brian
2376
Points
13
Posts
|
Try following:
Posted On:
24-Sep-2021 06:55
|
Rahul M...
4918
Points
28
Posts
|
The basic syntax of sort() method is as follows:
So, you can use following:
Posted On:
25-Sep-2021 22:46
|
Priya
1194
Points
33
Posts
|
Use following for Ascending order:
For descending order:
Posted On:
25-Sep-2021 22:48
Thanks. - beginer 27-Sep-2021 21:11
|
Blog
Active User (0)
No Active User!