On Wednesday, January 30, 2019 at 5:06:13 AM UTC-5, Colin Law wrote:
>
> On Wed, 30 Jan 2019 at 09:55, fugee ohu <fuge...@gmail.com <javascript:>> 
> wrote: 
> > ... 
> > I can print the outer values of parsed_obj with an iteration loop 
> > parsed_obj.each |key, val| do 
> > can you tell me how do i select individual keys within the nested hash 
> 'results' 
>
> Does that mean you have parsed it ok? 
>
> Isn't it obvious?  You have to use each|key,val| on the outer level 
> results to get their contents.  With different names for key and val 
> obviously. 
>
> Colin 
>

I found this extended discussion on different ways  of accessing hash 
values 
here 
https://stackoverflow.com/questions/5544858/accessing-elements-of-nested-hashes-in-ruby
 
How would I get results->productId

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/80aab61b-a2ad-4768-a465-56edc48d1d89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to