If I have a special data object:
var data = [];
data["Name"] = ["Janet", "James", "Jean", "Joe", "John"];
data["Number"] = [25, 22, 37, 19, 40];
Let's say I'm looking for the minimum number value, which is '19' in this case.
How can I retrieve and display the Name associated with this minimum number value? And how about the Name associated with the maximum value?
Is there a way to return two elements simultaneously and determine if they are related to each other?
I attempted using indexOf(), but it seems methods like that don't work as expected on Standard Objects. I am still learning Javascript, so any help would be greatly appreciated.
EDITED: Just realized I forgot to put square brackets around the arrays...