Flatten JSON
Flatten JSON lets you flatten nested values into JSON Pointer paths, escaping slash and tilde in keys. Enter your own values or load the worked example.
- Copy or download the computed result
- Adjust json
- See the processing method and limits
Method and calculation
Flatten nested values into JSON Pointer paths, escaping slash and tilde in keys.
Inputs and settings
Flatten JSON accepts JSON.
Worked example
Flatten JSON example — JSON: "{\"user\":{\"name\":\"Alice\"},\"tags\":[\"a\",\"b\"]}". Computed output: { "/user/name": "Alice", "/tags/0": "a", "/tags/1": "b" }
Output and limitations
Flatten JSON: Input is treated as plain text; it is never executed.
Technical references: RFC 8259 JSON format
Flatten JSON FAQs
Flatten JSON applies the following rule to your input: Flatten nested values into JSON Pointer paths, escaping slash and tilde in keys. The worked example on this page uses the same processor as the result button.
Flatten JSON has these boundaries: Input is treated as plain text; it is never executed. Start by checking the json field against the units or format shown.
Flatten JSON provides this sample: { "/user/name": "Alice", "/tags/0": "a", "/tags/1": "b" }. Use the sample button to reproduce it, then replace the inputs with your own values.