title: How to remove duplicates in a hash in Ruby on Rails?
body: <p>I have a hash like so:</p>
  
  <pre><code>[
    {
      :lname =&gt; "Brown",
      :email =&gt; "james@intuit.com",
      :fname =&gt; "James"
    },
    {
      :lname =&gt; nil,
      :email =&gt; "brad@intuit.com",
      :fname =&gt; nil
    },
    {
      :lname =&gt; "Smith",
      :email =&gt; "brad@intuit.com",
      :fname =&gt; "Brad"
    },
    {
      :lname =&gt; nil,
      :email =&gt; "brad@intuit.com",
      :fname =&gt; nil
    },
    {
      :lname =&gt; "Smith",
      :email =&gt; "brad@intuit.com",
      :fname =&gt; "Brad"
    },
    {
      :lname =&gt; nil,
      :email =&gt; "brad@intuit.com",
      :fname =&gt; nil
    }
  ]
  </code></pre>
  
  <p>What I would like to learn how to do is how to remove a record if it is duplicate. Meaning, see how there are several "brad@intuit.com" how can I remove the duplicate records, meaning remove all the others that have an email of "brad@intuit.com".... Making email the key not the other fields?</p>