title: How to convert Object to array of hashes with symbol keys
body: <p>I am trying: </p>
  
  <pre><code>Product.first.attributes.map{|k, v| "#{k.to_sym} =&gt; #{v}"}
  </code></pre>
  
  <p>However, I receive the output as follows:</p>
  
  <pre><code>["id =&gt; 53", "name = blah"], ["id =&gt; 54", "name = blahblah"]
  </code></pre>
  
  <p>What I want is:</p>
  
  <pre><code>[{:id=&gt;53,:name=&gt;"blah"}, {:id=&gt;54,:name=&gt;"blahblah"}]
  </code></pre>