title: ruby for each key/value pair in a hash
body: <p>I have a bit of a problem with MongoDB in that it returns hashes with the keys in double quotes and integers as floats all the time, has this been a problem for anyone else?</p>
  
  <p>for examples after a map reducing or grouping, say I have a bunch of hashes which look like this:</p>
  
  <pre><code>{"unknown"=&gt;54.0, "pedestrians"=&gt;572.0, "vehicles"=&gt;1045.0}
  </code></pre>
  
  <p>But what I really want is:</p>
  
  <pre><code>{ unknown: 54, pedestrians: 572, vehicles: 1045 }
  </code></pre>
  
  <p>Any ideas on how I can easily convert it?</p>