title: Sort Data In Node.JS
body: <p>I am using Node.JS and MongoDB. I've created a report with CSV file and 
  this is my code,</p>
  
  <pre><code>function buildListCsvContent() {
     var array = [];
     var counter = 0;
     for (var i = 0; i &lt; vm.student.length; i++) {
        var row = {
           No: counter + 1
           , Registration_Number: "'" + student.registrationNumber.toString()
           , Name: student.firstName + ' ' + student.lastName
        }
        array.push(row);
        counter++
     }
  }
  
  
  var args = {
     data: array
  };
  
  downloadCSV(args);
  </code></pre>
  
  <p>How can i sort this report by registrationNumber?</p>