---
name: converting-natural-language-into-jq-queries-for
description: "Translates plain-language JSON extraction or transformation goals into validated jq commands. Use when you need to filter, reshape, or pull fields from a JSON payload and want a tested command with an explanation."
license: CC-BY-4.0
compatibility: "Needs access to: Chat, Terminal."
metadata:
  author: "BotBento Editorial"
  version: "2026-10-16"
  source: "https://botbento.com/usecases/converting-natural-language-into-jq-queries-for/"
  kind: skill
  hermes:
    tags: ["json", "jq", "cli", "parsing", "developer tools"]
    category: coding
    requires_toolsets: ["terminal"]
---
# Converting natural language into jq queries for JSON payloads

Turn plain data extraction requests into precise command-line filters

## When to use

Working with nested JSON payloads often requires complex jq commands that are tedious to construct by hand. This setup translates your natural language filter or extraction goals into valid jq syntax, verifying against provided sample structures so you can manipulate and extract data without syntax headaches.

## Inputs

- `json_sample`: A sample snippet of the JSON document to inspect, including the nested structure relevant to the request.
- `extraction_goal`: The specific data to extract or the transformation to perform, stated in plain language.

## Steps

1. When you ask: User provides sample JSON and goal (User asks for a jq filter and provides a JSON sample plus the data or transformation they want.)
2. Construct and validate jq filter
3. Return tested command and explanation

## Instructions

Ask the user to paste a sample snippet of their JSON document along with the specific data they want to extract or transform. Generate the exact jq command required to achieve the result. Explain how each part of the pipeline works and provide sample output showing the transformed result. If the transformation involves running bash scripts that overwrite files or execute shell modifications, ask for confirmation before suggesting destructive terminal runs.

## Approvals

- Confirm before running or suggesting any bash script that overwrites files or makes shell modifications.

## Output

A tested jq command, a part-by-part explanation, and sample transformed output. (format: chat_message)

## Source

Summarized in our own words from [Show HN: JSON Query](https://news.ycombinator.com/item?id=45722826) (Hacker News, checked 2026-10-16). Any results described there are the authors’ own.

From the BotBento use-case directory: https://botbento.com/usecases/converting-natural-language-into-jq-queries-for/. Licence: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
