Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 examining the Monastery: (12)
As of 2014-10-31 10:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (216 votes), past polls