Back
let's say I run this query in Mongoose:
Room.find({}, function(err,docs){}).sort({date:-1});
Room.find({}, function(err,docs){
}).sort({date:-1});
This doesn't work!
To sort by date you can use the below-mentioned code:-
Blah.find({}).sort({date: -1}).execFind(function(err,docs){ });
31k questions
32.8k answers
501 comments
693 users