Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I need the field names in the JSON like:'select product, price from table'; warn Dumper $tmp; $c->render( json => $tmp) $VAR1 = [ [ 'apples', '$1' ], ['oranges', '$2' ] ];
How to do this with mojo?'select product, price from table'; warn Dumper $tmp; $c->render( json => $tmp) $VAR1 = [ [ product: 'apples', price:'$1' ], [ product: 'oranges', price: '$2' ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mojolicios - render json with field names
by Corion (Patriarch) on Nov 10, 2016 at 08:32 UTC | |
by Anonymous Monk on Nov 10, 2016 at 14:49 UTC | |
by Corion (Patriarch) on Nov 10, 2016 at 14:57 UTC | |
by Anonymous Monk on Nov 10, 2016 at 16:08 UTC | |
|
Re: Mojolicios - render json with field names
by robby_dobby (Hermit) on Nov 10, 2016 at 06:41 UTC |