jq filter
Try it interactively →POST /api/jq-filterApply jq filter expressions to JSON over HTTP. Full language including pipes, map, select, and paths. Streaming output, raw mode, slurp, null-input flags supported.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| filter* | string | "." | filter expression, e.g. `.`, `.name`, `.items | map(.id)`. |
| input* | file | — | JSON input to filter. UTF-8 text. |
| rawOutput | boolean | false | Emit raw strings without JSON quoting ( `-r`). |
| slurp | boolean | false | Read the entire input stream into a single array ( `-s`). |
| compact | boolean | false | Compact output instead of pretty-printed ( `-c`). |
| nullInput | boolean | false | Use null as the single input value; ignore input ( `-n`). |
Response
Modes: json, text. Cache: yes (24h TTL).
Code samples
Built from the identity example.
# Download or substitute the example input:
# curl -O https://xtract.bot/examples/jq-filter/hello-world.json
INPUT=$(base64 -w0 < hello-world.json)
curl -X POST https://api.xtract.bot/api/jq-filter \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"filter": ".",
"rawOutput": false,
"slurp": false,
"compact": false,
"nullInput": false,
"input": "'"$INPUT"'"
}'