前更換結腸癌雙引號我有如下哈希:哈希火箭
{"_id"=>BSON::ObjectId('567ccbd747824a621d8b4567'), "response"=>{"version"=>"1.1", "statusCode"=>302, "headers"=>{"content-type"=>[""], "content-length"=>[""], "host"=>["54.223.52.194:9011"], "connection"=>["keep-alive"], "cache-control"=>["max-age=0"], "accept"=>["text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"], "upgrade-insecure-requests"=>["1"], "user-agent"=>["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36"], "accept-encoding"=>["gzip, deflate, sdch"], .......}
我想更換與結腸癌的雙引號。預期的輸出是:
{:_id=>BSON::ObjectId('567ccbd747824a621d8b4567'), :response=>{:version=>"1.1",.....}
我怎麼能這樣做?
不完全相同:http://stackoverflow.com/a/4045194/2988 –