How do I flatten nested JSON into key-value pairs?
Features & Capabilities
The Flatten JSON action in AI Copilot converts deeply nested JSON structures into flat dot-notation key-value pairs. It extracts every leaf value with its full path, making it easy to see all data points at a glance.
How Flattening Works
-
Nested objects use dot notation:
user.address.city -
Arrays use bracket notation:
items[0].name - Only leaf values (strings, numbers, booleans, null) appear in the result
Example
Input
{ "user": { "name": "Alice", "tags": ["admin", "editor"] } }
Flattened Output
{ "user.name": "Alice", "user.tags[0]": "admin", "user.tags[1]": "editor" }
Two Result Tabs
Properties Tab
Clickable field cards showing each path, type, and value. Click a field to highlight it in the editor and mind map.
JSON Tab
The complete flattened JSON output as formatted, copyable text.
How to Use Flatten JSON
- 1 Paste or type your JSON in the input editor
- 2 Click AI Copilot in the sidebar
- 3 Select Flatten JSON from the actions list
- 4 Click Flatten — the result appears instantly
- 5 Switch between Properties and JSON tabs to explore the result
Good to Know
- Mind map sync: Click any field in the Properties tab to highlight the node in the mind map.
- Credits: Each flatten action uses a small number of credits based on the size of your JSON.
Note: AI features require an account and use credits. New accounts receive 1,000 free credits. See Credits & Pricing for details.
Still Have Questions?
Check out our other FAQ topics or return to the JSON Copilot app