I have a simple question on sorting results from the distinct command in mongodb.
I'm using Monk in my NodeJS app to get categories from my simple DB:
db.getCollection('citazioni').distinct('category')
But how can I apply a sorting function like I successfully do when I find documents with:
collection.find({}, {sort: {'_id': -1}}
??
Thank you!