Tag Archives: #dictionary

Iterating through a Dictionary

Keeping things simple for anybody who does a search about this subject: If we have a dictionary like this: var dictio:Dictionary = new Dictionary(); dictio[“france”]=”paris”; dictio[“england”]=”london”; you can iterate like this: Iterating through the keys: for(var country:String in dictio){ trace(country); // this lists england, france } Iterating through the values: for each(var capital:String in dictio){… Read More »