【发布时间】:2013-04-14 18:13:34
【问题描述】:
我尝试解析 JSON 响应。
@response = ActiveSupport::JSON.decode(@data.body)
@响应:
{"response"=>[{"name"=>"Den", "other"=>[{"sex"=>"male"}]}]}
如何访问
@response['response']['name']
和
@response['response']['name']['sex']
【问题讨论】:
标签: ruby-on-rails json parsing