SQL Reference
SORT
cursor.sort(document)
Section titled “cursor.sort(document)”- document: The fields to sort by, each mapped to 1 (ascending) or -1 (descending).
Example
Section titled “Example”db.users.find().sort({ age: -1 })SQL Reference
db.users.find().sort({ age: -1 })