Removing Duplicate Arrays from an Array of Arrays

In the Useful Array Tricks article, one of the tricks described how to ensure the contents of our array are unique and no duplicate items exist. The technique described really only worked when the array items in question were primitives like text or numbers. In this article, we will go one step further and look at another common case. What if the array items with potential duplicates were themselves arrays? How will we both identify the duplicate arrays and also remove those duplicates to ensure we have an array made up only of unique arrays? In this article, we’ll find out how!

This is a companion discussion topic for the original entry at

Really enjoyed this article and didn’t even think about your approach when I saw your initial question. Glad you published the article and pointed out these additional methods.

1 Like

that is very useful

1 Like