title: How to find duplicate values in a JavaScript array of objects, and output only unique values?
body: <p>I'm learning JS. Supposing I have the below array of objects:</p>
  
  <pre><code>var family = [
    {
      name: "Mike",
      age: 10
    },
    {
      name: "Matt"
      age: 13
    },
    {
      name: "Nancy",
      age: 15
    },
    {
      name: "Adam",
      age: 22
    },
    {
      name: "Jenny",
      age: 85
    },
    {
      name: "Nancy",
      age: 2
    },
    {
      name: "Carl",
      age: 40
    }
  ];
  </code></pre>
  
  <p>Notice that <em>Nancy</em> is showing up twice (changing only the age). Supposing I want to output only unique names. How do I output the above array of objects, without duplicates? ES6 answers <em>more than welcome.</em></p>
  
  <p>Related (couldn't find a good way for usage on objects):</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/9229645/remove-duplicates-from-javascript-array">Remove Duplicates from JavaScript Array</a></li>
  <li><a href="https://stackoverflow.com/questions/840781/easiest-way-to-find-duplicate-values-in-a-javascript-array">Easiest way to find duplicate values in a JavaScript array</a></li>
  </ul>
  
  <p><strong>EDIT</strong> Here's what I tried. It works well with strings but I can't figure how to make it work with objects:</p>
  
  <pre><code>family.reduce((a, b) =&gt; {
    if (a.indexOf(b) &lt; 0 ) {
      a.push(b);
    }
    return a;
  },[]);
  </code></pre>