Extract specific fields from API responses piped through curl without writing a script.
Filter and reshape JSON log files to find errors or specific events in deployment logs.
Transform configuration files or package metadata to extract version numbers or dependencies.
Combine with shell pipelines to process JSON data alongside grep, sort, and other Unix tools.
jq is a command-line tool for processing and transforming JSON data, in much the same way that tools like grep and sed let you process plain text on the command line. The problem it solves is that JSON has become the universal format for data exchange, API responses, configuration files, log outputs, but it is not designed to be readable or filterable with basic text tools. jq gives you a compact, expressive way to query, reshape, and extract information from JSON without writing a full program. The tool works through a filter language where you write an expression that describes the transformation you want applied to the input JSON. The simplest filters extract fields by name: the expression .version applied to a package.json file returns just the value of the version field. More complex filters can slice arrays, iterate over lists, apply conditional logic, restructure data into entirely new shapes, compute values, and combine multiple transformations in a pipeline. Because jq reads from standard input and writes to standard output, it fits naturally into Unix shell pipelines alongside curl, grep, sort, and other tools. A typical real-world use: you call an API with curl, pipe the raw JSON response into jq with a filter that extracts a specific list of values, and then pipe those values into another tool. What would otherwise require a short Python script becomes a single readable command line. jq is written in C with no runtime dependencies, so it ships as a single small executable available on macOS, Linux, and Windows through most package managers. You would reach for it any time you are working with JSON data in a shell, debugging an API, exploring a data file, writing a deployment script, or processing log output, and want to do it quickly without leaving the terminal.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.