title: How do I extract a value from this Ruby hash?
body: <p>I'm using the Foursquare API, and I want to extract the "id" value from this hash</p>
  
  <pre><code>[{"id"=&gt;"4fe89779e4b09fd3748d3c5a", "name"=&gt;"Hitcrowd", "contact"=&gt;{"phone"=&gt;"8662012805", "formattedPhone"=&gt;"(866) 201-2805", "twitter"=&gt;"hitcrowd"}, "location"=&gt;{"address"=&gt;"1275 Glenlivet Drive", "crossStreet"=&gt;"Route 100", "lat"=&gt;40.59089895083072, "lng"=&gt;-75.6291255071468, "postalCode"=&gt;"18106", "city"=&gt;"Allentown", "state"=&gt;"Pa", "country"=&gt;"United States", "cc"=&gt;"US"}, "categories"=&gt;[{"id"=&gt;"4bf58dd8d48988d125941735", "name"=&gt;"Tech Startup", "pluralName"=&gt;"Tech Startups", "shortName"=&gt;"Tech Startup", "icon"=&gt;"https://foursquare.com/img/categories/shops/technology.png", "parents"=&gt;["Professional &amp; Other Places", "Offices"], "primary"=&gt;true}], "verified"=&gt;true, "stats"=&gt;{"checkinsCount"=&gt;86, "usersCount"=&gt;4, "tipCount"=&gt;0}, "url"=&gt;"http://www.hitcrowd.com", "likes"=&gt;{"count"=&gt;0, "groups"=&gt;[]}, "beenHere"=&gt;{"count"=&gt;0}, "storeId"=&gt;""}] 
  </code></pre>
  
  <p>When I try to extract it by using <code>['id']</code>, I get this error <code>can't convert Symbol into Integer</code>. How do I extract the value using ruby? Also, how do I do this for multiple hashes extracting the "id" value each time?</p>
  
  <p>Please pardon my inexperience. Thanks!</p>