KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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? for examples after a map reducing or grouping, say I have a bunch of hashes which look like this: {"unknown"=>54.0, "pedestrians"=>572.0, "vehicles"=>1045.0} But what I really want is: { unknown: 54, pedestrians: 572, vehicles: 1045 } Any ideas on how I can easily convert it?
Tags (comma-separated)
Save Edits
Cancel