Skip to main content

Extract a single field

Get just the IDs from a list response:
Each filter result is printed on its own line, so the output flows naturally into shell loops:

Reshape the output

Filters can transform the response into a new structure. The following collects each instance’s id and name into a single array:

Combine with an external jq

The output of -q is still valid JSON when the filter produces JSON, so you can pipe it into jq (or any other JSON-aware tool) for further processing:

Multiple filters

-q can be repeated. Each filter’s results are zipped column-wise (space-separated per line), which is handy for tabular output:
Iteration stops at the shortest stream; a warning is emitted on stderr when a later filter runs out first.