Comparison¶
Where jonq Fits¶
jonq is a CLI JSON exploration and extraction tool. It is not a database, ETL system, or BI layer.
Important
Use jonq while the problem is still “understand this JSON” or “reshape this payload” from the shell. Once the problem becomes relational analytics, joins, window functions, or large-scale data movement, move to a tool built for that job.
When to Use jonq¶
You have raw JSON from an API, config file, or log stream.
You want to inspect nested paths before writing a query.
You need a readable jq one-liner in a shell script or CI job.
You want to reshape nested JSON before handing it to another system.
When to Use Something Else¶
Use raw jq when you already know the exact jq filter you want.
Use jello when you want Python expressions over JSON from the CLI.
Use gron when you want grep-friendly flattened assignment lines.
Use an analytics engine or database when you need joins, window functions, or repeated analytical queries over larger datasets.
Typical Workflow¶
Explore unknown JSON with jonq.
Extract or normalize the fields you need.
Pipe the result into the next shell command, script, or analytical system if you need more processing afterward.
jonq vs raw jq¶
The examples query the same array and produce equivalent results. Jonq
checks that values compared with numeric thresholds are JSON numbers.
Its coalesce uses the first non-null value and preserves false.
The corresponding jq filters include those checks explicitly.
cat > data.json <<'JSON'
[
{"name":"Alice","first":"Alice","last":"Ng","age":35,"city":"NY",
"nickname":false,"email":"alice@example.com","price":"12.5","ts":1700000000},
{"name":"Bob","first":"Bob","last":"Lee","age":"35","city":"LA",
"nickname":null,"email":null,"price":null,"ts":null}
]
JSON
Task |
Raw jq filter |
jonq one-liner |
|---|---|---|
Select fields |
|
|
Filter rows |
|
|
Sort + limit |
|
|
Standalone limit |
|
|
Distinct values |
|
|
IN filter |
|
|
NOT filter |
|
|
LIKE filter |
|
|
Uppercase |
|
|
Group & count |
|
|
CASE/WHEN |
|
|
COALESCE |
|
|
IS NULL |
|
|
String concat |
|
|
Type cast |
|
|
Date convert |
|
|
Tabular output |
|
|