I am using MongoDB with Node.JS. I have a collection which contains a date and other rows. The date is a JavaScript Date object.
Date
How can I sort this col
collection.find().sort('date':1).exec(function(err, doc) {});
this worked for me
referred https://docs.mongodb.org/getting-started/node/query/