jq is like sed for JSON data — a powerful filter language for slicing, filtering, mapping, and transforming structured data. It takes JSON input and produces formatted JSON output, making it essential for working with APIs and configuration files from the command line.
AI agents rely heavily on jq to parse API responses, extract specific fields from complex JSON structures, and reshape data between pipeline stages. Its expression language handles nested objects, arrays, conditionals, and string interpolation with a compact syntax that fits naturally into shell scripts.
Beyond simple field extraction, jq supports advanced operations like grouping, sorting, reducing, and custom function definitions. It processes data in a streaming fashion, handling large JSON files efficiently without loading everything into memory at once.