Ruby: Parsing a complex hash -


I have a hash that deepens many levels:

I through each service I am trying to loop, I am running in many neil [] errors, though hash is not zero.

For example:

  food_hash ["food"] ["food"] ["servings"]  

returns no problem. []

It may be because the IM is sleeping half but I can not seem to descend under "service description" ... Can anyone help me in the right direction?

I "service-statement"

meditation Please note that (1) servings.serving is an array, and (2) food does not have a key in the hash, instead try it out:

 < Code> f ["servings"] ["service"] [0] ["service_details"] = & gt; "1 thin piece (yield after cooking)"  

where f is hash


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -