Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 chilling in the Monastery: (6)
As of 2014-12-25 15:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls