This is a collection of jq
functions I commonly use. They exist as jq
modules.
Clone this repo into ~/.jq
:
$ git clone git@github.com:gregnr/jq-utils.git ~/.jq
Import the module, then call the function:
echo '[{"Sport": "Tennis", "WinningScore": 30}]' | jq -r 'import "utils" as utils; utils::arrayToCsv'