×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Solr Trovaprezzi
Added: Feb 3, 2016 2:14 PM
Views: 17
  1. function compare(a,b) {
  2.   if (a.last_nom < b.last_nom)
  3.     return -1;
  4.   else if (a.last_nom > b.last_nom)
  5.     return 1;
  6.   else
  7.     return 0;
  8. }
  9.  
  10. objs.sort(compare);