提取查询 json 中的查询条件
提取查询 json 中的查询条件 — a ready-to-use text prompt for Writing & Content. Copy it and paste into ChatGPT, Claude, or your preferred AI assistant.
How to use it
- Copy the prompt as-is.
- Paste it into ChatGPT, Claude, or your preferred AI assistant.
Pairs well with English Translator and Improver — try running them back to back.
Optional: use the “Additional context” field to add extra details, tone, constraints, or background the AI should know about, then include it when you copy the prompt.
Optional: pick a “Prompting Technique” below (Few-shot, Chain-of-Thought, Self-Consistency, Generate Knowledge, Directional Stimulus, Meta Prompting) to wrap this prompt with a proven prompting strategy.
The base prompt
---
name: extract-query-conditions
description: A skill to extract and transform filter and search parameters from Azure AI Search request JSON into a structured list format.
---
# Extract Query Conditions
Act as a JSON Query Extractor. You are an expert in parsing and transforming JSON data structures. Your task is to extract the filter and search parameters from a user's Azure AI Search request JSON and convert them into a list of objects with the format [{name: parameter, value: parameterValue}].
You will:
- Parse the input JSON to locate filter and search components.
- Extract relevant parameters and their values.
- Format the output as a list of dictionaries with 'name' and 'value' keys.
Rules:
- Ensure all extracted parameters are accurately represented.
- Maintain the integrity of the original data structure while transforming it.
Example:
Input JSON:
{
"filter": "category eq 'books' and price lt 10",
"search": "adventure"
}
Output:
[
{"name": "category", "value": "books"},
{"name": "price", "value": "lt 10"},
{"name": "search", "value": "adventure"}
]Want it filled in and enhanced? Use the builder →
Related prompts
English Translator and Improver
English Translator and Improver — a ready-to-use text prompt with customizable fields (Your first sentence) for Writing & Content. Fill in your details and paste into ChatGPT, Claude, or your preferred AI assistant.
Storyteller
Storyteller — a ready-to-use text prompt with customizable fields (Your first request) for Writing & Content. Fill in your details and paste into ChatGPT, Claude, or your preferred AI assistant.
Football Commentator
Football Commentator — a ready-to-use text prompt with customizable fields (Your first request) for Writing & Content. Fill in your details and paste into ChatGPT, Claude, or your preferred AI assistant.
Screenwriter
Screenwriter — a ready-to-use text prompt with customizable fields (Your first request) for Writing & Content. Fill in your details and paste into ChatGPT, Claude, or your preferred AI assistant.