Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get top items from json object

var top10 = data.sort(function(a, b) { return a.Variable1 < b.Variable1 ? 1 : -1; })
                .slice(0, 10);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #top #items #json #object
ADD COMMENT
Topic
Name
7+2 =