I have an array like this
var records:Object = {};
var arr:Array = [
records["nh"] = { medinc:66303},
records["ct"] = { medinc:65958},
records["nj"] = { medinc:65173},
records["md"] = { medinc:64596},
records["kk"] = { medinc:61321}
];
arr.sortOn("medinc", Array.NUMERIC);
and I have the array sorted numerically. My question is how I can get the numeric value from each record? I want to use that value to set the width of different movie clips.
Something like
object1.width=(record for the [0] position in the array)
object2.width=(record for the [1] position in the array)
object3.width=(record for the [2] position in the array)
etc…
I hope this is clear enough. Thanks for your help!
Basically, to address a certain field in the nested object, you address it as an associative array with an index of type String.