Database Management
MongoDB
Subjective
Sep 25, 2025
How do you sort results in MongoDB?
Detailed Explanation
Use the sort() method: db.collection.find().sort({field: 1}) for ascending, -1 for descending.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts