Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sort JavaScript array by two numeric fields

grouperArray.sort(function (a, b) {   
    return a.gsize - b.gsize || a.glow - b.glow;
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sort #JavaScript #array #numeric #fields
ADD COMMENT
Topic
Name
3+5 =