Perl: the Markov chain saw | |
PerlMonks |
Re^3: Create JSON file in specific formatby choroba (Cardinal) |
on Apr 24, 2018 at 16:13 UTC ( [id://1213485]=note: print w/replies, xml ) | Need Help?? |
"data" is the key you used on line 4 of your JSON. In other words, $struct is a hash reference, $struct->{data} is the value corresponding to the "data" key in the referenced hash. It contains an array reference to which the code pushes the subhashes. To get the output without ->pretty, just delete ->pretty from the code. How is a database involved? What error are you getting? How do you interact with it?
In Section
Seekers of Perl Wisdom
|
|