JSON processor for filtering, transforming, and extracting data
JSON processor for filtering, transforming, and extracting data.
jq '.field' file.json # Extract field
jq '.[] | .name' file.json # Extract from array
jq -r '.email' file.json # Raw output (unquoted strings)
jq -s 'add' file1.json file2.json # Merge arrays/objects
jq '.[] | select(.active)' file.json # Filter elements
jq '.[] | {id, name}' file.json # Pick fields
| Flag | Purpose |
|------|----------|
| -r | Output strings without quotes (raw mode) |
| -R | Read input as plain text lines, not JSON |
| -s | Slurp: read all inputs into single array |
| -n | Start with null input (no file reading) |
| -c | Compact output (single line) |
| -e | Set exit status based on output |
| --arg x v | Bind $x to string value v |
| --argjson x j | Bind $x to JSON value j |
| --sort-keys / -S | Sort object keys |
Extract nested field: jq '.user.address.city'
Map over array: jq '.[] | {id, status}'
Filter + transform: jq '.items[] | select(.qty > 0) | .name'
Use variables: jq --arg role admin '.users[] | select(.role == $role)'
Pretty-print: jq '.' messy.json (3-space indent by default)
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer