Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Parsing Array of arrays from json file

by 1nickt (Canon)
on Sep 12, 2021 at 10:38 UTC ( [id://11136682]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Parsing Array of arrays from json file
in thread Parsing Array of arrays from json file

Since the structure is one level deeper than you thought, you need to add another loop. Try this:

my @categories = $decoded_json[0]; foreach my $category (@categories){ foreach my $record (@$category) { print Dumper $record; print "Translation for $record->[0] is $record->[1 +]\n"; } }

Hope this helps!


The way forward always starts with a minimal test.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2024-03-28 12:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found