In Flex How to remove duplicates value in ArrayCollection ?

notebookAC.filterFunction = removeDuplicateNoteBookById

var tmpObjPage:Object = new Object();
private function removeDuplicatePageById(item:Object):Boolean
     if (!tmpObjPage.hasOwnProperty(item.page_id)) {
	tmpObjPage[item.page_id] = item;
	return true;
	return false;

private function removeDuplicatesValue(element:*,index:int,array:Array):Boolean
     return array.indexOf(element)== index;	//Tricks here

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s