On Wed, 30 Jan 2019 at 21:56, fugee ohu <fugee279@gmail.com> wrote:
> ...
> Everything in the unparsed resonse body that I want is between [ and ] I have to gsub it out
No you don't. After you get parsed_obj["results] (which is an array,
that's what the [] mean) then you can get the first product by
parsed_obj["results"][0]["productId"]
It is just an array. You have met ruby arrays haven't you?
I am rapidly losing the will to live.
Colin
--
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+unsubscribe@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/CAL%3D0gLu%3DNuwFq2dxaQzk3Tx8A54ndAAEafHjoDzTbPzuTjg-tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment