|
|
| Do you know where your variables are? | |
| PerlMonks |
Re: How to use a json string with nested array and nested hash elements?by aitap (Chaplain) |
| on Feb 04, 2013 at 10:27 UTC ( #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
|
|
||||||||||||||||||||