title: Creating multiple records in ruby from a hash of arrays
body: <p>I have a response consisting of a hash of arrays within a hash.  I need to create three records (see below) in ruby/rails.</p>
  
  <pre><code>{
      "first_name" =&gt; [John, Tom, Michael],
      "last_name" =&gt; [Smith, Watts, Pit],
      "email" =&gt; [John.smith@gmail.com, tom.watts@gmail.com,  mike.pit@gmail.com]
  }
  
  id  || first_name   || last_name  || email
  ----------------------------------------------
  1   || John         ||  Smith     || john.smith@gmail.com
  2   || Tom          ||  Watts     || tom.watts@gmail.com
  3   || Michael      ||  Pit       || mike.pit@gmail.com
  </code></pre>
  
  <p>I'm having difficulties understanding how to approach this. Any help would be very appreciated.</p>
  
  <p>So far I have:</p>
  
  <pre><code>response.keys.each do |field_name|
    response[field_name].each do |value|
       puts "#{field_name} =&gt; #{value}"
       User.create!(
         first_name: value['first_name'],
         last_name: value['last_name'],
         email:  value['email']
       )
    end
  end
  </code></pre>