System.Collections.Generic.Dictionary$2<string, string> ts如何遍历???



namespace FairyGUI.Utils {
        class XML extends System.Object {
            public name: string;
            public text: string;
            public attributes: System.Collections.Generic.Dictionary$2<string, string>;//这个如何遍历
 

TS:
xml.attributes => System.Collections.Generic.Dictionary$2<string, string>
for( key in  xml.attributes ){
     
     console.log( "----------->key: " + key + " value: " + xml.attributes[key] );//这样不能取出对应的键值呢,试了很多方法,貌似也取不出,不知道是何原理,请教谷主!

}
已邀请:

谷主

赞同来自:

for in估计是不行的,要等purets进化了。

taojianlong - 80后IT男

赞同来自:

XML TS解析类
 

一只居

赞同来自:

现在这个问题有解决方式了吗  我也碰到同样的问题..

要回复问题请先登录注册