示例:
//定义
private var _createRoleArray:Array =
[
{
id:1,
namePath:"ui/createrole/yuj.png",
spinemodel:"res/sk/yujian/yujian.sk"
},
{
id:2,
namePath:"ui/createrole/fy.png",
spinemodel:"res/sk/feiyu/feiyu.sk"
}
];
//获取值
var ele:Object = _createRoleArray[0]; //json串是一个对象
var str:String = ele.namePath; //或者 ele["namePath"]
网友评论