How to Use JSON Array Flattener: Steps and a Worked Example
Flatten nested JSON arrays into a single array. This guide shows what to enter, a worked example, and the limits to keep in mind. The JSON Array Flattener tool is free, needs no account and runs in your browser.
What you need
- Nested JSON array, for example [1, [2, [3]], 4]
Step by step
- Open the JSON Array Flattener tool.
- Fill in Nested JSON array.
- Read the result, which updates as soon as the inputs change.
Worked example
With these inputs:
- Nested JSON array: [1, [2, [3]], 4]
the tool returns:
[
1,
2,
3,
4
]
How it works
Paste a nested JSON array. Every level is flattened into one list in order.
Things to keep in mind
Check your inputs, units and any local rules before you rely on the result.
Related tools
If this is not quite what you need, try JSON Array to Lines, JSON Formatter or JSON Validator.