---
title: Create json object
description: Combines selected columns into a single JSON object stored under a new column.
category: Data Transforms
tags: [json, transform, nest, columns, data]
---

# Create json object

## Description

The **Create Json Object** activity nests multiple column values into a single JSON object under a new column. This transformation is useful when preparing data for APIs or JSON-based storage systems by grouping related fields together.

- You define the columns to combine using **Column Names**.
- The resulting JSON object will be stored under the name provided in **Output Column**.
- You can choose to retain or discard the original columns using **Include Original**.

> **Use case**: When sending address or contact information to an API, you may want to combine fields like `Street`, `City`, and `Zip` into a single structured JSON object called `Address`. This helps in keeping the data compact and grouped logically for downstream systems.

## Input

| Input Type | Required |
| ---------- | -------- |
| **Data**   | Required |

## Output

| Output Type | Format  | Description                                                |
| ----------- | ------- | ---------------------------------------------------------- |
| **Data**    | Tabular | Data with selected columns nested as a JSON object column. |

## Configuration Fields

| Field Name           | Description                                                                       |
| -------------------- | --------------------------------------------------------------------------------- |
| **Column Names**     | List of columns to combine into a JSON object.                                    |
| **Output Column**    | The column name where the resulting JSON object will be stored.                   |
| **Include Original** | If true, the original columns are kept in the output. If false, they are removed. |

## Sample Input

| Name  | Age | Street         | City     | Zip   |
| ----- | --- | -------------- | -------- | ----- |
| Alice | 30  | 123 Maple Ave  | New York | 10001 |
| Bob   | 40  | 456 Oak Street | Chicago  | 60601 |

## Sample Configuration

<table>
  <tr><td><b>Column Names</b></td><td>["Street", "City", "Zip"]</td></tr>
  <tr><td><b>Output Column</b></td><td>Address</td></tr>
  <tr><td><b>Include Original</b></td><td>false</td></tr>
</table>

## Sample Output

| Address                                                    |
| ---------------------------------------------------------- |
| {"Street":"123 Maple Ave","City":"New York","Zip":"10001"} |
| {"Street":"456 Oak Street","City":"Chicago","Zip":"60601"} |
