go ahead... be a heretic | |
PerlMonks |
Re: Iterate JSON Fileby kcott (Archbishop) |
on Aug 06, 2018 at 06:45 UTC ( [id://1219918]=note: print w/replies, xml ) | Need Help?? |
G'day mijares93, Welcome to the Monastery. [Sorry, I'm a little late to the party on this one: I'm catching up after some travelling.] The data returned from decode_json is typically a complex data structure and you can access its internal parts quite easily. Consider this short script:
Output:
The "$json_file" is what you posted plus
to close the "observations" array (with the ']') and the JSON object as a whole (with the '}'). "... I am new to Perl ..." Here's some suggested reading:
— Ken
In Section
Seekers of Perl Wisdom
|
|