← 返回命令列表

Linux command

jiq 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Query JSON from stdin

echo '[1, 2, 3]' | jiq

Query a JSON file

cat [path/to/file.json] | jiq

Query from a curl response

curl -s [https://api.example.com/data] | jiq

说明

jiq is an interactive JSON query tool that uses jq filter expressions. It reads JSON from stdin and provides a terminal interface where you can type jq queries and see the results update in real time as you type. This makes it easy to explore and drill down into complex JSON structures incrementally. jiq requires jq to be installed and available in your PATH, as it delegates query execution to jq.

FAQ

What is the jiq command used for?

jiq is an interactive JSON query tool that uses jq filter expressions. It reads JSON from stdin and provides a terminal interface where you can type jq queries and see the results update in real time as you type. This makes it easy to explore and drill down into complex JSON structures incrementally. jiq requires jq to be installed and available in your PATH, as it delegates query execution to jq.

How do I run a basic jiq example?

Run `echo '[1, 2, 3]' | jiq` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more jiq examples?

This page includes 3 examples for jiq, plus related commands for nearby Linux tasks.