I have an associative array which looks like:
var data = { 0: { 'Number_of_Something': 212 }, 1: { 'Number_of_Something': 65 }, 2: { 'Number_of_Something': 657 } } I need to extract the highest value in the field Number_of_Something, however, because it is a field within an object of an object, it is a little more complicated than just following a similar method to something outlined here.
Looping through the object and storing the value, then replacing it if the next one is larger seems like the easiest and obvious option.
I am simply asking this question in case there is a simpler (smarter) way of achieving this other than the method outlined above?
dataan object and not an array or at least array-like object?