title: What's the most elegant way in ES6 to filter out duplicates in an array in Javascript
body: <p>I've seen alot of answers to this topic but I'm not completely satisfied. The snippet I liked the most was this one:</p>
  
  <pre><code>[ ["1", "2"], ["1", "2", "3"], ["1", "2"] ]
    .filter(
      (path: string[], i: number, array: string[][]) =&gt; _.findIndex(array, x =&gt; _.isEqual(x, path)) === i
    )
  </code></pre>
  
  <p>This works but I find it waaaayy too verbose for my liking. Isn't there a more compact way to achieve this? Even if it means using lodash or something. I feel I'm missing something really obvious in the year 2019 (nearly 2020).</p>