title: Convert Active Record Object into Hash
body: <p>I have a model Person with fields email, name, age, phone_number. I want to convert <code>Person.all</code> to a hash.
  The hash should have the structure as follows:</p>
  
  <pre><code>{
  "email1" =&gt; ["name", "age", "phone_number"],
  "email2" =&gt; ["name2", "age2", "phone_number2"]
  ....
  }
  </code></pre>
  
  <p>I tried <code>as_json</code>, <code>map</code> or <code>attributes</code> etc. But it returns array of hashes. How can I create this custom structure?</p>