I try parse JSON response.
@response = ActiveSupport::JSON.decode(@data.body)
@response:
{"response"=>[{"name"=>"Den", "other"=>[{"sex"=>"male"}]}]}
how to access
@response['response']['name']
and
@response['response']['name']['sex']
@response['response'][0]['name']
and
@response['response'][0]['other'][0]['sex']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With