Saturday 25 August 2018

Sort in mongoose

Hi i know how to sort in mongoose but the problem is that the thing i want to sort by is a property ie field.sortParam. I tried doing .sort({field.sortParam}) but this throws an error is there any way to solve it?Thanks for any answers ;)

Submitted August 25, 2018 at 01:55PM by everek123

No comments:

Post a Comment