Parse JSON with Ruby -
i have 2 json returns.
one able parse fine
{"login"=>"foo", "id"=>bar,
with
@foobar_collect["login"]
but 1 having issues with
{"items"=>[{"user_id"=>foo, "user_type"=>"bar",
i try
@foobar_collect["items"]["user_id"]
and gives me error no implicit conversion of string integer
what doing wrong?
@foobar_collect["items"].first["user_id"]
Comments
Post a Comment