<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Duplicate on Elliot Sachs</title><link>https://www.elliotsachs.com/tags/duplicate/</link><description>Recent content in Duplicate on Elliot Sachs</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>Copyright © 2026 Elliot Sachs</copyright><lastBuildDate>Mon, 07 May 2018 14:58:41 +0000</lastBuildDate><atom:link href="https://www.elliotsachs.com/tags/duplicate/index.xml" rel="self" type="application/rss+xml"/><item><title>How To Get Rid Of Duplicate Objects In An Array</title><link>https://www.elliotsachs.com/how-to-get-rid-of-duplicate-objects-in-an-array/</link><pubDate>Mon, 07 May 2018 14:58:41 +0000</pubDate><guid>https://www.elliotsachs.com/how-to-get-rid-of-duplicate-objects-in-an-array/</guid><description>&lt;p&gt;There might be a better way to do this, but I found it to be a pretty straightforward method.&lt;/p&gt;
&lt;p&gt;If you have an array of objects where some objects are duplicates, you can create a Set based on the property you want to use as a filter and then you can use the filter method over the original array, to only return the object if the property in question is still in the Set. If there&amp;rsquo;s a match, you want to make sure to remove that property from the Set so the duplicated Object doesn&amp;rsquo;t match with anything in the Set.&lt;/p&gt;</description></item></channel></rss>