Getting Item Index using Data Field

0 views
Skip to first unread message

pradee...@gmail.com

unread,
Feb 15, 2010, 2:02:27 AM2/15/10
to Flex India Community
Hi
I have a doubt on Arrays.
I have some thing like this:
memberNamesCollection:array = new Array();
memberNamesCollection.push({memberName:name, Age:age});
....
Each users registers their name and age as mention above into the
memberNamesCollection array;

Now, How to get the index of a particular member using "memberName"
data field ONLY and using "indexOf".
Also i wud not like to use for loop here.

Thanks,
Pradeep Pasam

Ravi Mishra

unread,
Feb 15, 2010, 2:20:56 AM2/15/10
to Flex India Community
Try using ArrayCollections. There is a method called
getItemIndex(item:Object), you can use this method.

HTH,

-Ravi
http://achieveravi.blogspot.com

On Feb 15, 12:02 pm, "pradeep.pa...@gmail.com"

Reply all
Reply to author
Forward
0 new messages