Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 browsing the Monastery: (10)
As of 2014-09-17 19:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (95 votes), past polls