title: Sorting of document collection with compromising performance in SSJS
body: <p>I want to sort notesDocument collection based on any key or date in ascending order ( document creation date). Actually I need data to display in data table in <strong>descending  order</strong> so that user can view most recent record on the top. </p>
  
  <p>Please provide me solution to sort the collection but I don't want to <strong>compromise the performance</strong>.</p>
  
  <p>Thanks,
  Qaiser</p>