获得"键"在Actionscript中-3的对象的对象、QUOT、Actionscript

2023-09-08 12:33:17 作者:花落微凉梦清幽

给定一个对象:

MyObj中= {关键:'值'}

我如何拿到钥匙?

推荐答案

您必须通过所有的钥匙环

You have to loop through the all the keys

for (var key:String in myObj) {
 //...
}

注:为(X在OBJ)遍历键,而每个(X在OBJ)遍历值。

Note: for(x in obj) iterates over the keys, while for each(x in obj) iterates over the values.

 
精彩推荐
图片推荐