I have some XML structures like this:
var struct:XML = <mh>
<mi id="1" stuff="whatever"/>
<mi id="2" stuff="whatever"/>
<mi id="3" stuff="whatever"/>
</mh>;
I know I can access a subnode by "id", in this way:
var stuff:Object = struct.(hasOwnProperty('@id') && @id == '2').@stuff;
Now I have some similar ArrayCollection structure:
private var cmenu:ArrayCollection = new ArrayCollection([
{id:"1", stuff:"whatever"},
{id:"2", stuff:"whatever"},
{id:"3", stuff:"whatever"}
]);
I wonder if items can be accessed in a similar way, like this:
var stuff:Object = cmenu['id == 2'].stuff;
Is it possible?