MongoDB - sort the collection

Professionaluser
Posted by Professionaluser under Sql Server category on | Points: 40 | Views : 236
sort() method in MongoDB can be used to sort the query results based on a filed

>db.restaurants.find().sort ( { "name": "ABC"} )

Comments or Responses

Login to post response