laziness, impatience, and hubris | |
PerlMonks |
Re: How to use a json string with nested array and nested hash elements?by aitap (Curate) |
on Feb 04, 2013 at 10:27 UTC ( [id://1016928]=note: print w/replies, xml ) | Need Help?? |
my @jsonarray = $decoded_json->{strarray};It's not an array, but an array reference. You should dereference it: my @jsonarray = @{$decoded_json->{strarray}};. Read perlreftut and perlref for more information on references.
Sorry if my advice was wrong.
In Section
Seekers of Perl Wisdom
|
|