Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: loop through JSON data with Perl

by Siddartha (Curate)
on Oct 02, 2011 at 22:09 UTC ( #929192=note: print w/replies, xml ) Need Help??


in reply to loop through JSON data with Perl

This should do it:
for my $item( @{$json_object} ){ print $item->{name} . "\n"; }
It's just an array that you need to loop through.

Replies are listed 'Best First'.
Re^2: loop through JSON data with Perl
by srchulo (Sexton) on Oct 02, 2011 at 22:13 UTC

    Yeah, I tried this. It doesn't work :/

        Hmmm...now that I am looking that more closely it isn't well-formed JSON. I believe that is the issue. Thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://929192]
help
Chatterbox?
[marto]: someone else writes: [http://www. evanmiller.org/why -im-learning-perl- 6.html|
[marto]: err, Why Iím Learning Perl 6

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2017-07-26 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (395 votes). Check out past polls.