How to conver JSON collection into Hash using Rails 3 -
i having json collection fetched mongodb & want convert hash.
how can so..?
thanks in advance..
how did fetch mongo? ruby mongo driver automatically gives ruby hashes.
edit: take second question account
in mongo, queries don't execute until call requires them execute. before call to_json, still playing query object.
instead of to_json, try using to_a array of hashes back.
Comments
Post a Comment