JSON Copilot

Flatten JSON — Convert Nested Structures to Flat Key-Value Pairs

February 2026

AI Copilot Feature New

The new Flatten JSON action in AI Copilot converts deeply nested JSON structures into flat dot-notation key-value pairs. Instantly see every leaf value with its full path — perfect for debugging, data analysis, and understanding complex API responses.

What It Does

Flatten JSON takes a nested JSON structure and produces a flat object where each key is the full dot-notation path to a leaf value. Arrays use bracket notation (e.g., items[0].name). Only primitive values (strings, numbers, booleans, null) appear in the output.

Input (Nested)
{
  "user": {
    "name": "Alice",
    "address": {
      "city": "Portland",
      "zip": "97201"
    },
    "tags": ["admin", "editor"]
  }
}
Output (Flattened)
{
  "user.name": "Alice",
  "user.address.city": "Portland",
  "user.address.zip": "97201",
  "user.tags[0]": "admin",
  "user.tags[1]": "editor"
}

Two Result Views

The flatten result includes two tabs for different workflows:

Properties Tab

Browse every flattened field as a clickable card showing the path, type, and value. Click a field to highlight it in the editor and mind map.

JSON Tab

View the complete flattened JSON output as formatted, copyable text. Great for pasting into other tools or config files.

How to Use

  1. 1Paste or load JSON into the editor
  2. 2Open the AI Copilot panel from the sidebar
  3. 3Select Flatten JSON from the list of actions
  4. 4Click Flatten — the result appears instantly
  5. 5Switch between the Properties and JSON tabs to explore the result

Use Cases

  • API Debugging: Quickly see all values in a deeply nested API response without expanding every level
  • Data Migration: Convert nested config files into flat key-value pairs for environment variables or .env files
  • Documentation: Generate a list of all fields and their types from a JSON payload
  • Testing: Verify that all expected fields exist and have correct values in a complex JSON structure

Good to Know

  • Mind Map Sync: Click any field in the Properties tab to focus the matching node on the mind map and highlight the JSON in the Output tab — and vice versa.
  • History: Flatten results are saved in your AI Copilot history for future reference.
  • Credits: Each flatten action uses a small number of credits based on the size of your JSON.