title: Parse Json data into simple array Ruby on Rails 4
body: <p>I got the following json array in the ajax call like this </p>
  
  <pre><code>item    restaurants
  places  [{"geometry":{"location":{"H":31.485241,"L":74.30220800000006}},"icon":"https://maps.gstatic.com/mapfiles
  /place_api/icons/restaurant-71.png","id":"f8d9edcb5068bcd868e225429e881a351a5e2795","name":"Subway","opening_hours"
  :{"open_now":true,"weekday_text":[]},"photos":[{"height":720,"html_attributions":["&lt;a href=\"https:/
  /maps.google.com/maps/contrib/116044146831530051317\"&gt;Adnan Fayyaz&lt;/a&gt;"],"width":960}],"place_id":"ChIJpaImhvEDGTkRw35DXlvUTIE"
  ,"price_level":1,"rating":2.9,"reference":"CmRaAAAAr8mbHo-J1Wq8YTjzyiHRmwMkh40-26VJ6WqBxgjdAtT4v2HuT
  Lb_OEYS7DUqHHIOe__ywd7S0E8oWgarwGD-DdlS1SVmrEo_Sl58o3PO528LAPGBSuN8luGTXLkKS0waEhCBQcGYE1ejtMRrY1F6zK5NGhTuIi9f4ht2CC0obNOpChdD1P_8yA"
  ,"scope":"GOOGLE","types":["restaurant","food","point_of_interest","establishment"],"vicinity":"A Block
  , Lahore","html_attributions":[]}]
  </code></pre>
  
  <p>Now when i do <code>p params["item"]</code> in the console it gives me 'restaurants' (correct) when i do <code>p params["places"]</code> it gives me the whole response (which is again correct) but when i try to get (let's say) first geometry thing by typing <code>p params['places'][0]</code> it gives me just two brackets like  </p>
  
  <blockquote>
    <p>[ <br> [</p>
  </blockquote>
  
  <p>and nothing else is shown . while my expecting result is first element in the array which is geometry thing . also p params['places'][0].geometry gives nil , why ? what am i missing</p>