Ok take the following: fiddle
how do i run a for each collecting the highest value for each of the north values and the lowest for the south in javascript?
Ok i went for this:
function finder(cmp, arr, attr) {
var val = arr[0][attr];
for (var i = 1; i < arr.length; i++) {
val = cmp(val, arr[i][attr]);
}
return val;
}
Math.min/Math.max