title: Remove Duplicates within a map function
body: <p>I'm trying to remove duplicates in the array.
  I have tags from posts, which is also array:</p>
  <p><code>tags: ['react', 'javascript', 'node']</code></p>
  <p>and from map function I have output like this:
  <code>node react javascript react javascript react javascript node</code></p>
  <pre><code>&lt;div class=&quot;tags&quot;&gt;
    {posts.map(post =&gt;
      post.frontmatter.tags.map(tag =&gt; (
        &lt;Link
          key={tag + `tag`}
          to={`/tags/${kebabCase(tag)}/`}
          className=&quot;tag is light&quot;
        &gt;
          {tag}
        &lt;/Link&gt;
      ))
    )}
  &lt;/div&gt;
  </code></pre>
  <p>I've tried to implement <code>.filter</code> and <code>reduce</code>, but I'm stuck.</p>
  <p>Thanks in advance</p>