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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -