1.2.11 • Published 2 years ago
jfq v1.2.11
jfq
JSONata on the command line.
This was inspired by the excellent jq utility, and uses JSONata rather than the
jq language.
Installation
npm install --global jfqUsage
jfq [options] [<JSONata query>] [<files>]It is good practice to put the JSONata query in single quotes, so that the shell does not attempt to interpret it.
The output will formatted as JSON, unless it's an array of simple objects (e.g. string, number)
when the output is flattened to a series of lines, so that it can be piped to another program such as xargs.
Options
-n, --ndjsonoutput as newline-delimited JSON (each object on a single line)-j, --jsonforce output as JSON, when it would normally be flattened-y, --yamloutput as YAML-a, --accept-yamlaccept YAML input-q, --query-file <path>read JSONata query from a file
Examples
- To read the version of JSONata from the file
package.json:
jfq 'dependencies.jsonata' package.json
# ^1.5.0- To find out how many downloads of JSONata there have been each month in the past year:
curl -s \
https://api.npmjs.org/downloads/range/last-year/jsonata \
| jfq 'downloads{$substring(day, 0, 7): $sum(downloads)}'
# {
# "2017-02": 36216,
# "2017-03": 46460,
# "2017-04": 40336,
# ...
# }1.2.11
2 years ago
1.2.10
3 years ago
1.2.9
4 years ago
1.2.8
5 years ago
1.2.7
5 years ago
1.2.6
5 years ago
1.2.5
5 years ago
1.2.4
5 years ago
1.2.3
5 years ago
1.2.2
6 years ago
1.2.1
6 years ago
1.2.0
7 years ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago
0.0.6
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
8 years ago