Hi,
It's a little confusing but $mojo->tx->res->json returns the de-serialized data from the JSON response.
So for clarity you should rename your $json_food variable to, e.g., $data_food. You can then access elements of the hashref as you would normally, e.g. $data_food->{fdcId}.
Hope this helps!
In reply to Re: decoding a JSON object
by 1nickt
in thread decoding a JSON object
by anautismobserver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |