jq-json-processorProcess, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor.
Install via ClawdBot CLI:
clawdbot install Arnarsson/jq-json-processorInstall jq (brew):
brew install jqInstall jq (apt):
Install jq (apt)Requires:
Process, filter, and transform JSON data with jq.
# Extract a field
echo '{"name":"Alice","age":30}' | jq '.name'
# Output: "Alice"
# Multiple fields
echo '{"name":"Alice","age":30}' | jq '{name: .name, age: .age}'
# Array indexing
echo '[1,2,3,4,5]' | jq '.[2]'
# Output: 3
# Map over array
echo '[{"name":"Alice"},{"name":"Bob"}]' | jq '.[].name'
# Output: "Alice" "Bob"
# Filter array
echo '[1,2,3,4,5]' | jq 'map(select(. > 2))'
# Output: [3,4,5]
# Length
echo '[1,2,3]' | jq 'length'
# Output: 3
# Pretty print JSON
cat file.json | jq '.'
# Compact output
cat file.json | jq -c '.'
# Raw output (no quotes)
echo '{"name":"Alice"}' | jq -r '.name'
# Output: Alice
# Sort keys
echo '{"z":1,"a":2}' | jq -S '.'
# Select with conditions
jq '[.[] | select(.age > 25)]' people.json
# Group by
jq 'group_by(.category)' items.json
# Reduce
echo '[1,2,3,4,5]' | jq 'reduce .[] as $item (0; . + $item)'
# Output: 15
# Read from file
jq '.users[0].name' users.json
# Multiple files
jq -s '.[0] * .[1]' file1.json file2.json
# Modify and save
jq '.version = "2.0"' package.json > package.json.tmp && mv package.json.tmp package.json
Extract specific fields from API response:
curl -s https://api.github.com/users/octocat | jq '{name: .name, repos: .public_repos, followers: .followers}'
Convert CSV-like data:
jq -r '.[] | [.name, .email, .age] | @csv' users.json
Debug API responses:
curl -s https://api.example.com/data | jq '.'
-r for raw string output (removes quotes)-c for compact output (single line)-S to sort object keys--arg name value to pass variablesjq '.a' | jq '.b'Full manual: https://jqlang.github.io/jq/manual/
Interactive tutorial: https://jqplay.org/
Generated Mar 1, 2026
Extract specific data fields from JSON API responses to display in user interfaces, such as pulling user names and email addresses from a customer database API. This reduces bandwidth usage and improves frontend performance by processing only necessary data.
Parse and filter JSON-formatted system logs to identify errors or monitor performance metrics, such as extracting error codes and timestamps from application logs. This aids in troubleshooting and maintaining system health in real-time environments.
Convert and restructure JSON data from sources like APIs or databases into standardized formats for loading into data warehouses, such as flattening nested objects or aggregating values. This streamlines data integration processes in analytics workflows.
Update and validate JSON configuration files for applications or infrastructure, such as modifying version numbers or environment variables in deployment scripts. This ensures consistency and reduces manual errors in automated pipelines.
Filter and segment JSON customer data from CRM systems to create targeted marketing lists, such as selecting users based on purchase history or demographics. This enables personalized campaigns and improves marketing efficiency.
Offer a cloud-based service that integrates jq for JSON processing into existing platforms, allowing users to filter and transform data via API calls. Revenue is generated through subscription tiers based on usage volume and advanced features.
Provide expert consulting to help businesses implement jq in their data workflows, along with training workshops for teams to master JSON processing. Revenue comes from hourly rates for consultations and fixed fees for training sessions.
Offer paid support and customization for jq in enterprise environments, such as developing plugins or optimizing scripts for large-scale data processing. Revenue is generated through support contracts and one-time development projects.
💬 Integration Tip
Integrate jq into shell scripts or CI/CD pipelines to automate JSON processing tasks, using pipes to chain commands for efficient data flow.
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
Command-line tool to manage Google Workspace services including Gmail, Calendar, Drive, Sheets, Docs, Slides, Contacts, Tasks, People, Groups, and Keep.
Runs shell commands inside a dedicated tmux session named claw, captures, and returns the output, with safety checks for destructive commands.
A modern text-based browser. Renders web pages in the terminal using headless Firefox.
Write robust, portable shell scripts. Use when parsing arguments, handling errors properly, writing POSIX-compatible scripts, managing temp files, running commands in parallel, managing background processes, or adding --help to scripts.
NotebookLM CLI wrapper via `node {baseDir}/scripts/notebooklm.mjs`. Use for auth, notebooks, chat, sources, notes, sharing, research, and artifact generation/download.