Rails: How to extract values from JSON

Very simple question (I am beginner). I have a JSON response from fb containing names and ids:

[{"name"=>"John Kline", "id"=>"10276192"}, {"name"=>"Quinn Kumbers",   
 "id"=>"18093781"}, {"name"=>"Dan Jacobs", "id"=>"100000918716828"}] ...

How do I extract and access this data in my rails app while preserving its structure? I'd like to be able to tell rails - "give me the id of the 2nd entry", or, "give me the 275th entry" - these sorts of things.

Please assume no knowledge when answering. thx!

5
задан ismcc 5 January 2011 в 21:15
поделиться