jq

Command-line JSON processor. Extract, filter, transform JSON.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "jq" with this command: npx skills add opendndapps/ogt-skills/opendndapps-ogt-skills-jq

All platforms: See jqlang.org/download for packages, binaries, and build instructions.

Usage

jq '[filter]' [file.json]
cat file.json | jq '[filter]'

Quick Reference

.key                    # Get key
.a.b.c                  # Nested access
.[0]                    # First element
.[]                     # Iterate array
.[] | select(.x > 5)    # Filter
{a: .x, b: .y}          # Reshape
. + {new: "val"}        # Add field
del(.key)               # Remove field
length                  # Count
[.[] | .x] | add        # Sum
keys                    # List keys
unique                  # Dedupe array
group_by(.x)            # Group

Flags

-r raw output (no quotes) · -c compact · -s slurp into array · -S sort keys

Examples

jq '.users[].email' data.json          # Extract emails
jq -r '.name // "default"' data.json   # With fallback
jq '.[] | select(.active)' data.json   # Filter active
jq -s 'add' *.json                     # Merge files
jq '.' file.json                       # Pretty-print

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

ogt-docs-create

No summary provided by upstream source.

Repository SourceNeeds Review
General

ogt-docs-changelog

No summary provided by upstream source.

Repository SourceNeeds Review
General

ogt-docs-rules

No summary provided by upstream source.

Repository SourceNeeds Review
General

ogt-docs

No summary provided by upstream source.

Repository SourceNeeds Review