如何比较actionscript中arrayList的标签字段

时间:2013-03-13 09:20:01

标签: 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},
                {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}
            ]}, ]);

0 个答案:

没有答案