> For the complete documentation index, see [llms.txt](https://docs.auditboardanalytics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.auditboardanalytics.com/tools/clean/parsejson.md).

# ParseJSON

Parse JSON offers the ability to flatten or explode JSON objects from one JSON column into new broken out columns in your dataset. You can also select the max level to flatten if you want to flatten to deeper levels in the JSON string.

<figure><img src="/files/uXIyxWQiuoSLjkjUdIvO" alt=""><figcaption></figcaption></figure>

Any JSON array can be parsed via explode or flatten.&#x20;

<table><thead><tr><th width="265">Option</th><th>Description</th></tr></thead><tbody><tr><td>Flatten</td><td>Flattening converts nested JSON objects into a flat structure</td></tr><tr><td>Explode</td><td>Exploding means creating separate rows for each object in the array</td></tr><tr><td>Max level to flatten</td><td>This setting is asking how many levels deep the tool should go to flatten nested JSON structures. JSON data can be nested, meaning objects can contain other objects or arrays. Flattening means converting this nested structure into a flat table-like structure.</td></tr></tbody></table>

{% hint style="info" %}
Note that when entering the number of levels to flatten, If left blank,  the tool will normalize all levels. If JSON cannot be flattened at the level selected, tool will return nothing.
{% endhint %}

### Example 1 (Flatten)

Let's say we have a table with a "Hierarchy" column that contains a JSON array:

{% embed url="<https://datawrapper.dwcdn.net/yq93I/2/>" %}

We can choose to flatten the "Hierarchy" column and it will get the following result with a new "Category" column:

{% embed url="<https://datawrapper.dwcdn.net/3FwdK/1/>" %}

### Example 2 (Explode)

Let's say we have a table with a "Size" column that contains a JSON array:

{% embed url="<https://datawrapper.dwcdn.net/KAlvb/1/>" %}

We can choose to explode the "Size" column and it will get the following result with a new "Size\_1" column:

{% embed url="<https://datawrapper.dwcdn.net/lg9Bq/1/>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.auditboardanalytics.com/tools/clean/parsejson.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
