title: Remove Duplicate objects from JSON Array
body: <p>I'm trying to create a series of lists in HTML of the form:</p>
  <pre><code>&lt;div&gt;
      &lt;h3&gt;Math K&lt;/h3&gt;
      &lt;li&gt;Counting &amp; Cardinality&lt;/li&gt;
      &lt;li&gt;Geometry&lt;/li&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;h3&gt;Math 1&lt;/h3&gt;
      &lt;li&gt;Counting &amp; Cardinality&lt;/li&gt;
      &lt;li&gt;Orders of Operation&lt;/li&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;h3&gt;Math 2&lt;/h3&gt;
      &lt;li&gt;Geometry&lt;/li&gt;
  &lt;/div&gt;
  </code></pre>
  <p>My original though was to create an array and push that into the <code>&lt;div&gt;</code> element on the page with <code>$(&quot;#divid&quot;).append(array)</code>. I created an array that looks like this:</p>
  <pre><code>var standardsList = [
      {&quot;Grade&quot;: &quot;Math K&quot;, &quot;Domain&quot;: &quot;Counting &amp; Cardinality&quot;},
      {&quot;Grade&quot;: &quot;Math K&quot;, &quot;Domain&quot;: &quot;Counting &amp; Cardinality&quot;},
      {&quot;Grade&quot;: &quot;Math K&quot;, &quot;Domain&quot;: &quot;Counting &amp; Cardinality&quot;},
      {&quot;Grade&quot;: &quot;Math K&quot;, &quot;Domain&quot;: &quot;Counting &amp; Cardinality&quot;},
      {&quot;Grade&quot;: &quot;Math K&quot;, &quot;Domain&quot;: &quot;Geometry&quot;},
      {&quot;Grade&quot;: &quot;Math 1&quot;, &quot;Domain&quot;: &quot;Counting &amp; Cardinality&quot;},
      {&quot;Grade&quot;: &quot;Math 1&quot;, &quot;Domain&quot;: &quot;Counting &amp; Cardinality&quot;},
      {&quot;Grade&quot;: &quot;Math 1&quot;, &quot;Domain&quot;: &quot;Orders of Operation&quot;},
      {&quot;Grade&quot;: &quot;Math 2&quot;, &quot;Domain&quot;: &quot;Geometry&quot;},
      {&quot;Grade&quot;: &quot;Math 2&quot;, &quot;Domain&quot;: &quot;Geometry&quot;}
  ];
  </code></pre>
  <p>And I need to remove the duplicates so that something like this remains:</p>
  <pre><code>var standardsList = [
      {&quot;Grade&quot;: &quot;Math K&quot;, &quot;Domain&quot;: &quot;Counting &amp; Cardinality&quot;},
      {&quot;Grade&quot;: &quot;Math K&quot;, &quot;Domain&quot;: &quot;Geometry&quot;},
      {&quot;Grade&quot;: &quot;Math 1&quot;, &quot;Domain&quot;: &quot;Counting &amp; Cardinality&quot;},
      {&quot;Grade&quot;: &quot;Math 1&quot;, &quot;Domain&quot;: &quot;Orders of Operation&quot;},
      {&quot;Grade&quot;: &quot;Math 2&quot;, &quot;Domain&quot;: &quot;Geometry&quot;}
  ];
  </code></pre>
  <p>I've tried installing underscore.js and using ._uniq but that only seems to work when a single <code>key:value</code> pair appears in the object. I can't seem to get it to work across multiple keys.</p>
  <p>When I try something like:</p>
  <pre><code>var uniqueStandards = _.uniq(standardsList, function(item, key, Domain){
      return item.Domain;
  });
  </code></pre>
  <p>I only get the first three unique values (one per grade). But I need all the unique values across both grade and domain. Is there a simple way to feed both keys to the _.uniq function?</p>
  <p>Ultimately, I need a list with the each unique grade as the header and the unique domains as the list items to pass into an HTML page.</p>