// the key must be a String
Map result = new HashMap();
// injected
public var countryLabelRegexes:Object;
// example key: NATIONAL-BE
var key:String = label + REGEX_KEY_DELIMITER + (legalAddress.country as Country).isoCountryCode;
// check if the dynamic object has a property NATIONAL-BE (equivalent to java map.hasKey("NATIONAL-BE");
if(countryLabelRegexes.hasOwnProperty(key)) {
// retrieve the value
result = countryLabelRegexes[key];
}
Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/ic9p1AD44Tg/12815