title: Trying to extract key value from parsed JSON in ruby
body: <p>I’m trying to parse some JSON from the twitter API and extract the value of a key (“media_url”), which is a sub-key of the key (“entities”) </p>
  
  <p>so far I have:</p>
  
  <pre><code>url = 'https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&amp;screen_name=print_broadcast&amp;count=1'
  response = RestClient.get(url)
  data=response.body
  result = JSON.parse(data)
  </code></pre>
  
  <p>How would I extract a key value from the parsed JSON?
  I’ve tried </p>
  
  <pre><code>result[“entities”] 
  </code></pre>
  
  <p>etc, but I get en error when trying to convert a string to integer... the result of my parsed JSON is an array - shouldn't this be a hash? </p>
  
  <p>Sorry for the dumb questions.</p>
  
  <p>Any help would be appreciated.</p>