Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: JSON Structure Question

by stephen (Priest)
on May 22, 2013 at 22:00 UTC ( [id://1034822]=note: print w/replies, xml ) Need Help??


in reply to JSON Structure Question

If you want to get, say, the value of "subject1" of each sequence, the easiest way is with the values keyword, as in:

my $data = $json->decode($jsonfeed); my @values = (); foreach my $value ( values %{ $data } ) { push(@values, $value->{'subject1'}); } print Dumper( \@values );

Which returns

$VAR1 = [ 'value', 'value', 'value' ];

I'm not too clear on what values you're looking for, so I hope this helps.

stephen

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-19 22:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found