title: Sorted a javascript array of objects by an object property
body: <p>Hay, i have an array of objects and i need to sort them (either DESC or ASC) by a certain property of each object.</p>
  
  <p>Here's the data</p>
  
  <pre><code>obj1 = new Object;
  obj1.date = 1307010000;
  
  obj2 = new Object;
  obj2.date = 1306923600;
  
  obj3 = new Object;
  obj3.date = 1298974800;
  
  obj4 = new Object;
  obj4.date = 1306923600;
  
  obj5 = new Object;
  obj5.date = 1307096400;
  
  data = [obj1,obj2,obj3,obj4,obj5];
  </code></pre>
  
  <p>Now, i want to order the data array so that the objects are in order by date.</p>
  
  <p>Can someone help me with this?</p>