Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^3: Create JSON file in specific format

by choroba (Bishop)
on Apr 24, 2018 at 16:13 UTC ( #1213485=note: print w/replies, xml ) Need Help??

in reply to Re^2: Create JSON file in specific format
in thread Create JSON file in specific format

"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?

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1213485]
NodeReaper eats a grue

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2018-07-21 15:51 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (449 votes). Check out past polls.