<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Removing duplicate items from an array using the Array.filter() method</title>
	<link>http://blog.flexexamples.com/2007/08/05/removing-duplicate-items-from-an-array-using-the-arrayfilter-method/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Fri, 05 Dec 2008 10:16:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/05/removing-duplicate-items-from-an-array-using-the-arrayfilter-method/#comment-69</link>
		<author>peterd</author>
		<pubDate>Mon, 06 Aug 2007 18:05:34 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/05/removing-duplicate-items-from-an-array-using-the-arrayfilter-method/#comment-69</guid>
		<description>Bob,

I believe it can.

Try something like this:

&lt;pre class="code"&gt;
dedupedArrColl = new ArrayCollection(arr);
dedupedArrColl.filterFunction = removedDuplicates;
dedupedArrColl.refresh();
&lt;/pre&gt;

And then change the filtering function to this:
&lt;pre class="code"&gt;
/** Note that the method has 1 parameter now instead of 3, the rest of the code can remain the same */
private function removedDuplicates(item:Object):Boolean {
   // ...
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Bob,</p>
<p>I believe it can.</p>
<p>Try something like this:</p>
<pre class="code">
dedupedArrColl = new ArrayCollection(arr);
dedupedArrColl.filterFunction = removedDuplicates;
dedupedArrColl.refresh();
</pre>
<p>And then change the filtering function to this:</p>
<pre class="code">
/** Note that the method has 1 parameter now instead of 3, the rest of the code can remain the same */
private function removedDuplicates(item:Object):Boolean {
   // ...
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://blog.flexexamples.com/2007/08/05/removing-duplicate-items-from-an-array-using-the-arrayfilter-method/#comment-68</link>
		<author>Bob</author>
		<pubDate>Mon, 06 Aug 2007 17:37:23 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/05/removing-duplicate-items-from-an-array-using-the-arrayfilter-method/#comment-68</guid>
		<description>Nice example! Can this be done with an ArrayCollection as well?</description>
		<content:encoded><![CDATA[<p>Nice example! Can this be done with an ArrayCollection as well?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FlexLover</title>
		<link>http://blog.flexexamples.com/2007/08/05/removing-duplicate-items-from-an-array-using-the-arrayfilter-method/#comment-65</link>
		<author>FlexLover</author>
		<pubDate>Sun, 05 Aug 2007 21:35:34 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/05/removing-duplicate-items-from-an-array-using-the-arrayfilter-method/#comment-65</guid>
		<description>Tank'you very much, this is the right example for me.</description>
		<content:encoded><![CDATA[<p>Tank&#8217;you very much, this is the right example for me.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
