jq
Command-line JSON processor for filtering, transforming, and extracting data from JSON documents and API responses.
42 commands
Browse by Topic
Install jq (macOS)
Install jq using Homebrew on macOS
Install jq (Linux)
Install jq using APT on Debian/Ubuntu Linux
Check jq version
Verify jq is installed and display version
Compact JSON
Output compact single-line JSON
Get value by key
Extract value of a specific key
List all keys
Get all keys from object
Get length
Get length of array or object
Get multiple keys
Extract multiple keys into new object
Get nested value
Extract nested value
Null-safe access
Access key without error if missing
Pretty print JSON
Format and colorize JSON output
Raw string output
Output raw strings without quotes
Get value type
Get the type of a value
Group by key
Group array elements by key
Check key exists
Filter objects that have a key
Filter by condition
Filter elements matching condition
Filter by string contains
Filter where string contains value
Filter greater than
Filter where value greater than
Filter non-null values
Filter out null values
Filter by type
Filter elements by type
Sort array
Sort array elements
Sort by key
Sort array by object key
Get unique values
Remove duplicate values from array
Add to array
Add element to array
Get first element
Get first element of array
Flatten nested arrays
Flatten nested arrays into single array
Iterate array
Iterate over all array elements
Get last element
Get last element of array
Map array
Transform each array element
Reverse array
Reverse array order
Slice array
Get array elements from index 2 to 4
Limit results
Get first N elements
Add key to object
Add new key-value pair to object
Delete key
Remove key from object
Array to object
Convert key-value array to object
Merge objects
Deep merge two JSON objects
Get all paths
Get all paths in JSON structure
Recursive descent
Find all name fields recursively
Rename key
Rename object key
Object to array
Convert object to key-value array
Update key value
Update value of existing key
Transform object keys
Transform all object keys
Discussion
Loading comments...