Closed ddo closed 9 years ago
You can sort by multiple fields using something like:
User.find({}, ['age', '-name', 'id'], function (err, users) {
});
Where you using Array of needed arguments and '-' before for sorting this field backwards. You probably try to have not a fields named 'A' or 'Z' - this may cause bugs in multiple sorting though
Is there any way to do sort by multiple property/column ?