Is there a way to pass a value to a flex ArrayCollection and check whether it exists there or not. I mean, I want to insert values to a Flex Array but before that, i need to check if it already exists or not. Let me know if we can do this without looping through the ArrayCollection which i found as a bottleneck if the length of the ArrayCollection is high
Search a value in Flex Array Collection
actionscript-3arraycollectionflex4
Best Answer
Just check the API docs: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/collections/ArrayCollection.html
ArrayCollection#getItemIndex is what you want.