title: How to separate an array of hashes into different arrays if a key is equal?
body: <p>I've got an array of hashes in the following form:</p>
  
  <pre><code>{"user_id"=&gt;2, "user_name"=&gt;"Pepo", "beneficiary_document"=&gt;"43991028", "calification_by_qualifier"=&gt;5.0}
  {"user_id"=&gt;2, "user_name"=&gt;"Pepo", "beneficiary_document"=&gt;"71730550", "calification_by_qualifier"=&gt;3.8499999999999996}
  {"user_id"=&gt;3, "user_name"=&gt;"Carlos", "beneficiary_document"=&gt;"43991028", "calification_by_qualifier"=&gt;0.0}
  {"user_id"=&gt;3, "user_name"=&gt;"Carlos", "beneficiary_document"=&gt;"71730550", "calification_by_qualifier"=&gt;3.4}
  </code></pre>
  
  <p>basically i want to separate that array into arrays that contain the same value for the key <code>beneficiary_document</code>, so for this example i'd expect two arrays, one containing:</p>
  
  <pre><code>{"user_id"=&gt;2, "user_name"=&gt;"Pepo", "beneficiary_document"=&gt;"43991028", "calification_by_qualifier"=&gt;5.0}
  {"user_id"=&gt;3, "user_name"=&gt;"Carlos", "beneficiary_document"=&gt;"43991028", "calification_by_qualifier"=&gt;0.0}
  </code></pre>
  
  <p>and another one containing </p>
  
  <pre><code>{"user_id"=&gt;3, "user_name"=&gt;"Carlos", "beneficiary_document"=&gt;"71730550", "calification_by_qualifier"=&gt;3.4}
  {"user_id"=&gt;2, "user_name"=&gt;"Pepo", "beneficiary_document"=&gt;"71730550", "calification_by_qualifier"=&gt;3.8499999999999996}
  </code></pre>
  
  <p>How can i grant this?</p>
  
  <p>Thanks a lot for reading.</p>