Actionscript 3 如何比较actionscript中arrayList的标签字段
我有一个arrayList:Actionscript 3 如何比较actionscript中arrayList的标签字段,actionscript-3,arraylist,Actionscript 3,Arraylist,我有一个arrayList: public var exampleData:IList = new ArrayList([ {title: 'data1', data:[ {label:'IT', value: 50}, {label:'Business', value: 46}, {label:'Doctor', value: 64}, {la
public var exampleData:IList = new ArrayList([
{title: 'data1', data:[
{label:'IT', value: 50},
{label:'Business', value: 46},
{label:'Doctor', value: 64},
{label:'Teacher', value: 85},
{label:'Engineer', value: 98}
]} ,
{title: 'data2', data:[
{label:'IT', value: 63},
{label:'Businss', value: 46},
{label:'Doctor', value: 38},
{label:'Tea', value: 51},
{label:'Enee', value: 24}
]} ,
{title: 'data3', data:[
{label:'IT', value: 37},
{label:'Business', value: 58},
{label:'Doctor', value: 48},
{label:'Teacher', value: 14},
{label:'Engineer', value: 28}
]}, ]);
我想比较arrayList中每个数组的标签字段。默认值,与第一个数组(标题:'data1')进行比较。类似的结果如下:
public var resultData:IList = new ArrayList([
{title: 'data1', data:[
{label:'IT', value: 50},
{label:'Business', value: 46},
{label:'Doctor', value: 64},
{label:'Teacher', value: 85},
{label:'Engineer', value: 98}
]} ,
{title: 'data3', data:[
{label:'IT', value: 37},
{label:'Business', value: 58},
{label:'Doctor', value: 48},
{label:'Teacher', value: 14},
{label:'Engineer', value: 28}
]}, ]);
我不知道你想干什么。您是否正在尝试删除不跟随第一个数组的数组?是的,David,只需按标签字段跟随第一个数组在我开始之前有一个旁注:您应该将
resultData:IList=new ArrayList
更改为resultData:IList=new IList
,我认为不是,可以使用resultData:IList=new-ArrayList
您可以使用new-ArrayList
,但使用new-IList