title: What is the javascript equivalent of the MongoDb sort function?
body: <p>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.</p>
  
  <p>Example of a mongodb query and sort:</p>
  
  <pre><code>documentService.findAll().sort ({name: 1, height: -1})
  </code></pre>