Hi Guys!
Sometimes we might need to go through all the values from a action script dictionary.
Here is very simple example.
var dictionary:Dictionary = new Dictionary();
dictionary["first_name"] = "Shubham";
dictionary["last_name"] = "Goyal";
dictionary["location"] = "India";
for (var key:Object in dictionary)
{
trace(key); // first_name, last_name, location
trace(dictionary[key]); // Shubham, Goyal, India
}
for in loop traverse the whole dictionary and on each iteration we get key of the dictionary.
Cheers!