There might be a better way to do this, but I found it to be a pretty straightforward method. 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.