jq Playground
Test jq expressions against JSON data in real time.
Explore common snippets, build filters, and copy the ready-to-use command for your terminal.
⚠
This playground simulates common jq operations in JavaScript. For full jq spec, run
jq locally.
Install jq →
Press Ctrl+Enter to run
Run a filter to see output
Terminal command:
echo '...' | jq '.'
Common Snippets
Quick Reference
. Identity — pretty-print whole input .key Get object field .key.nested Get nested field .key? Optional field (no error if missing) .[] Iterate array or object values .[0] First array element .[-1] Last array element .[2:5] Array slice (index 2–4) keys Get object keys as array values Get object values as array length Length of array/string/object type Type of value has("key") Check if key exists select(cond) Filter items by condition map(.field) Map: transform each element map(select(.active)) Filter array by field [.[] | .name] Collect results into array add Sum numbers or concat arrays/strings unique Remove duplicate values group_by(.field) Group array by field value sort_by(.field) Sort array by field to_entries Object to [{key,value}] array from_entries [{key,value}] to object with_entries(.value += 1) Transform object entries . + {k:v} Merge/add field to object del(.key) Delete a key from object empty Produce no output (filter all) env All environment variables ascii_downcase Lowercase string split(",") Split string into array Related Products
on GumroadDeveloper Productivity Toolkit
Complete dev environment setup: VS Code settings, keybindings, snippets, shell aliases, Git hooks, tmux config, and Starship prompt. Copy, paste, code faster.
Buy on Gumroad →Premium Workflow Pack
Production-grade workflows, architecture guides, and deployment scripts for teams that ship. 10 advanced CI/CD workflows (blue-green, canary, E2E, security), 5 architecture deep-dives, code review checklist, PR process guide, and 5 battle-tested Bash deployment scripts.
Buy on Gumroad →GitHub Actions CI/CD Templates Pack
12 production-ready GitHub Actions workflow templates covering Node.js, Python, Docker, multi-environment deployments, security scanning, and auto-changelog. Copy, paste, ship.
Buy on Gumroad →You Might Also Need
JSON Diff Viewer
Free JSON diff viewer. Compare two JSON objects side-by-side with color-coded highlights: added lines in green, removed in red. Auto-formats JSON before comparing. Runs in your browser — your data nev
Open free tool →
Fake Data Generator
Generate realistic fake user data for testing and development. Choose locale (en/zh-TW/ja), count (1-100), fields to include, and output format (JSON/CSV/SQL INSERT). 100% browser-based.
Open free tool →
JSON Diff
Free JSON diff tool. Compare two JSON objects side-by-side with color-coded highlights: added lines in green, removed in red. Auto-formats JSON before comparing. Runs in your browser — your data never
Open free tool →
More Free Tools
Related Articles
jq 命令列 JSON 處理完全指南:範例與實戰大全
jq 是處理 JSON 資料的終極 CLI 工具。本文涵蓋篩選、轉換、陣列操作、條件判斷、格式化輸出,以及與 curl 結合的實戰 API 資料處理範例。
20 Best CLI Tools Every Developer Needs in 2026
The definitive list of CLI tools that actually improve developer productivity in 2026: navigation, file ops, search, git, system monitoring, terminal setup, and dev utilities — with install commands and real usage examples.
Aider AI: The Ultimate Terminal-Based AI Coding Assistant for 2026
Complete guide to Aider AI coding assistant. Setup, best practices, model options, and how this terminal-based tool compares to GUI editors for serious developer workflows.
How to Format JSON in VS Code, Terminal, and Online (2026 Guide)
Learn how to format JSON in VS Code, the terminal with jq and Python, and instantly online. This 2026 guide covers every method with working code examples and shortcuts.
CSV to JSON Online: Convert Spreadsheet Data in One Click
Convert CSV to JSON online free — paste spreadsheet data and get valid JSON instantly. Handles headers, quoted commas, custom delimiters, and type coercion.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →