title: Rails: Remove element from array of hashes
body: <p>I have the following array: </p>
  
  <pre><code> array = [{"email"=&gt;"test@test.com", "name"=&gt;"Test"},
            {"email"=&gt;"testA@test.com", "name"=&gt;"Test A"},
            {"name"=&gt;"Test B", "email"=&gt;"testB@test.com"},
            {"email"=&gt;"testC@test.com", "name"=&gt;"Test C"},
            {"name"=&gt;"Test D", "email"=&gt;"testD@test.com"},
            {"email"=&gt;"testE@test.com"},
            {"name"=&gt;"Test F", "email"=&gt;"testF@test.com"}]
  </code></pre>
  
  <p>I have a list of "blacklist" emails, for instance:</p>
  
  <pre><code> blacklist = ["testC@test.com"]
  </code></pre>
  
  <p>I want to do something like this: </p>
  
  <pre><code> array - blacklist 
   # =&gt; should remove element {"email"=&gt;"testC@test.com", "name"=&gt;"Test C"} 
  </code></pre>
  
  <p>Surely there is a sexy-Ruby way to do this with .select or something, but I haven't been able to figure it out.  I tried this to no avail:</p>
  
  <pre><code> array.select {|k,v| v != "testC@test.com"} # =&gt; returns array without any changes
  </code></pre>