Thursday 4 April 2013

Remove Duplicate Values from Array in Sencha Touch 2

 Ext.Array.unique() is used to remove the duplicate (repeated values) from array. This method accept array as the parameter and returns new array with unique values.
 var arrayValues = [123,456,123,'whatever','test','whatever'];
 var uniqueArray = Ext.Array.unique(arrayValues);
 console.log(uniqueArray);
 Output : uniqueArray will print the following values [123,456,'whatever','test']

 Hope, you enjoyed this Post.

No comments:

Post a Comment