我尝试解析 JSON 响应。
@response = ActiveSupport::JSON.decode(@data.body)
@回复:
{"response"=>[{"name"=>"Den", "other"=>[{"sex"=>"male"}]}]}
如何访问
@response['response']['name']
和
@response['response']['name']['sex']
我尝试解析 JSON 响应。
@response = ActiveSupport::JSON.decode(@data.body)
@回复:
{"response"=>[{"name"=>"Den", "other"=>[{"sex"=>"male"}]}]}
如何访问
@response['response']['name']
和
@response['response']['name']['sex']