Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by 7stud (Deacon)
on Feb 04, 2013 at 19:22 UTC ( #1016997=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #ref($docoded_json->{strarry} confirms array.  Store in array for easi
    +er processing:
    
    my @jsonarray = $decoded_json->{strarray};
    
  2. or download this
    use strict;
    use warnings;
    ...
    
    --output:--
    ARRAY
    
  3. or download this
    my @jsonarray = $decoded_json->{strarray};  
    
  4. or download this
    my @jsonarray = $aref;
    
  5. or download this
    @{ $jsonarray[0] }
    
  6. or download this
    
    my @jsonarray = $decoded_json->{strarray};
    
  7. or download this
    
    my @jsonarray = @{ $decoded_json->{strarray} };
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2015-07-29 04:19 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 (260 votes), past polls