Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sort mongoose response

Blah.find({}).sort({date: -1}).execFind(function(err,docs){
//code
});

-1 for descending & 1 for ascending
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sort #mongoose #response
ADD COMMENT
Topic
Name
5+5 =