Created
May 8, 2020 14:14
-
-
Save atamaniuc/926b2a17959878e5591d222d29d5c8b4 to your computer and use it in GitHub Desktop.
Removing Duplicate Arrays from an Array of Arrays
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let bigArray = [["a", "b", "c"], | |
[1, 2, 3], | |
[true, true, false], | |
[":)", ":P", ":X"], | |
[true, false, false], | |
[1, 2, 3], | |
["foo", "zorb", "blarg"], | |
["a", "b", "c"]]; | |
let uniqueArray = Array.from(new Set(bigArray.map(JSON.stringify)), JSON.parse); | |
console.log(uniqueArray); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment