title: How do I parsing data from JSON object?
body: <p>I'm just starting to dabble in consuming a JSON web service, and I am having a little trouble working out the best way to get to the actual data elements.</p>
  
  <p>I am receiving a response which has been converted into a Ruby hash using the <code>JSON.parse</code> method.  The hash looks like this:</p>
  
  <pre><code>{"response"=&gt;{"code"=&gt;2002, "payload"=&gt;{"topic"=&gt;[{"name"=&gt;"Topic Name", "url"=&gt;"http://www.something.com/topic", "hero_image"=&gt;{"image_id"=&gt;"05rfbwV0Nggp8", "hero_image_id"=&gt;"0d600BZ7MZgLJ", "hero_image_url"=&gt;"http://img.something.com/imageserve/0d600BZ7MZgLJ/60x60.jpg"}, "type"=&gt;"PERSON", "search_score"=&gt;10.0, "topic_id"=&gt;"0eG10W4e3Aapo"}]}, "message"=&gt;"Success"}}
  </code></pre>
  
  <p>What I would like to know, is what is the easiest way to get to the "topic" data so I can do something like:</p>
  
  <pre><code>topic.name = json_resp.name
  topic.img = jsob_resp.hero_image_url
  etc
  </code></pre>