title: How to "uniqueify" a javascript array of objects?
body: <p>How does one remove objects in an array that match across all keys and values? I've seen variations of this question but only for a particular field.</p>
  
  <p>For example, given the following input the output would look like so:</p>
  
  <pre><code>&gt; var a = [
    {a:1, b:'x'},
    {a:1, b:'y'},
    {a:1, b:'y'},
    {a:2, b:'x'},
    {a:2, b:'y'},
    {a:2, b:'y'},
    {a:2, b:'x'},
    {b:'y', a:2},
    {a:2, b:'y', c:'surprise!'}
  ]
  &gt; blackbox(a)
  [
    {a:1, b:'x'},
    {a:1, b:'y'},
    {a:2, b:'x'},
    {a:2, b:'y'},
    {a:2, b:'y', c:'surprise!'}
  ]
  </code></pre>
  
  <p>Ideally <code>blackbox</code> isn't hard-coded with the keys.</p>