If it is a dynamic object, you can use for..in or for..each loops to
enumerate all of the properties.
Note, If you have an object, like: var oLookup:Object = {p1:"v1",
p2:"v2", pa:"va", pb:"vb"};
You can randomly access the properties like this:
var sPropertyName:String = "pa";
var sPropertyValue:String = oLookup[sPropertyName];
Tracy Spratt
Lariat Services
Flex development bandwidth available
________________________________
From: [email protected] [mailto:[email protected]] On
Behalf Of thelordsince1984
Sent: Thursday, February 05, 2009 6:20 AM
To: [email protected]
Subject: [flexcoders] Re: Array Collection
--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "thelordsince1984" <lore...@...> wrote:
>
> Hi,
>
> i've have an array collection of objects...every object is like this
one:
>
> - id:path
>
> private function create(id:String, path:String):void {
> var arrayCollection:ArrayCollection = new ArrayCollection();
> var o:Object = {id:path};
> arrayCollection.addItem(o);
> }
>
> i would create a function that has a parameter, the id, and check if
> there is a correspondence between the parameter id function and that
> one into the array collection. In this case i would also trace the
> path value...
>
>
>
> can you help me?
>
> thanks
> Regards
> Lorenzo
>
it's ok..
instead if i would parse an object that contains strings?
for example i've an object that has three strings like this
- test1, test2, test3
so i would trace strings separately..how can i do this?