For example i have an ArrayCollection, and i want to find persons with telephone begines with “944” how can i do this?
<mx:ArrayCollection id="arrColl" >
<mx:source>
<mx:Array>
<mx:Object telephone="944768" subscriber="Smith P.T."/>
<mx:Object telephone="944999" subscriber="Peterson Q.T."/>
</mx:Array>
</mx:source>
</mx:ArrayCollection>
Are you displaying this ArrayCollection as a dataprovider to a user somewhere? If so, then you can set
arrColl.filterFunctionproperty of the collection and then callarrColl.refresh()Example filter function:
If you’re just trying to get an Array of all the ones beginning with 944, you can use the same function– just apply it to every item in
arrCollto determine whether or not it should be in your resulting Array.