Given an Object:
myObj = {key : 'value'}
How do I get the key?
You have to loop through the all the keys
for (var key:String in myObj) {
//...
}
Note: for(x in obj)
iterates over the keys, while for each(x in obj)
iterates over the values.