MongoDB return all documents by field without duplicates?
Is there any way in the mongo shell I can return all documents in a collection, but order them by a specific field and remove any documents with fields the same as other documents?
Thanks.
node.js
mongodb
mongo-shell
For sort I would use sort.
To remove document with same value: distict.