Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: How to use a json string with nested array and nested hash elements?

by aitap (Deacon)
on Feb 04, 2013 at 10:27 UTC ( #1016928=note: print w/ replies, xml ) Need Help??


in reply to How to use a json string with nested array and nested hash elements?

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.


Comment on Re: How to use a json string with nested array and nested hash elements?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016928]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2015-07-30 11:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls