I\'m trying to create a JavaScript function which takes information from an array in an external JSON and then takes the max value (or the top 5 values) for one of the JSON
function getMaxOfJson(jsonalreadyparsed, property) { var max = null; for (var i=0 ; i max){ max = jsonalreadyparsed[i][property]; } } } return max; }
This works for me.