Flex : How to remove Duplicates from an Array
Tagged Under : Flex
If you have an Array and you want to get rid of duplicates from the array, here is a little function you can use to achieve the same.
Basically, all its doing is making use of the forEach function built in Flex that runs a custom function for every item in the Array. This function then sorts the data alphabetically, checks each value with the previous value and if they are not same, adds the unique element to the new tempArray and thats what gets returned.
Might be useful for some I guess!