Flex 遍历Object键和值的示例代码
发布时间:2016-12-29 来源:查字典编辑
摘要:遍历键for(vark:Stringinobj){trace("Key:"+k+"-value:"+obj[k]);}遍历值foreach(...
遍历键
for(var k:String in obj) { trace("Key: " + k + " - value: " + obj[k]); }
遍历值
for each(var v:* in obj) { trace("Value: " + v); }