I would like to create a Javascript function that works like the MongoDb sort function, for sorting object arrays. I am having trouble finding any documentation on how the MongoDB sort function works.
Example of a mongodb query and sort:
documentService.findAll().sort ({name: 1, height: -1})