I am trying to generate a response that returns the same collection sorted by 3 different columns. Here\'s the code I currently have:
var findRoute = router.
Have you tried ?
Box.find().sort("-itemCount").exec(function(err, boxes) { res.json(boxes) });
Also for sorting your results based on 2 or more fields you can use :
.sort({name: 1, size: -1})
Let me know if that helps.