App-jt
view release on metacpan or search on metacpan
# Run a piece of code on each hash
cat orders.json | jt --map 'say "$_{name} sub-total: " . $_{count} * $_{price}'
=head1 DESCRIPTION
jt assumes the input is some data serialized as JSON, and perform transformation
based on its parameter. It can be used to deal with various RESTful web service
api, such as ElasticSearch.
=head1 OUTPUT OPTIONS
The default output format is JSON. If C<--csv> is provided then simple fields
are chosen and then converted to CSV. If C<--tsv> is provided then it becomes
tab-separated values.
=head1 SELECTING FIELDS
The C<--field> option can be used to select only the wanted fields in the output.
The field name notation is based on L<Hash::Flatten> or C<MongoDB>. C<"."> is used
( run in 0.768 second using v1.01-cache-2.11-cpan-64827b87656 )