---
title: Extract with json path
description: Extract values from JSON content using JSONPath expressions.
category: Data Transformation
tags: [json, extract, transformation, jsonpath]
---

# Extract with json path

## Description

The **Extract With JSON Path** activity extracts data from JSON-encoded columns using a user-defined [JSONPath](https://goessner.net/articles/JsonPath/) expression. This is useful for parsing nested JSON objects and retrieving specific elements.

> **Use case**:  
> When a column contains raw JSON (e.g., `{"user": {"name": "Alice"}}`), this activity allows you to extract specific values (e.g., `.user.name`) and move them to a separate column.

---

## Input

| Type | Description                       |
| ---- | --------------------------------- |
| Data | Dataset containing JSON column(s) |

---

## Output

| Type             | Description                                                  |
| ---------------- | ------------------------------------------------------------ |
| Transformed Data | Data with a new column containing extracted values from JSON |

---

## Configuration Fields

| Field Name           | Required | Description                                                                 |
| -------------------- | -------- | --------------------------------------------------------------------------- |
| **Column Name**      | Yes      | The column that contains the JSON string                                    |
| **Output Column**    | Yes      | Name of the new column that will hold the extracted result                  |
| **JSON Path**        | Yes      | JSONPath expression to select the value from the JSON (e.g., `$.user.name`) |
| **Include Original** | No       | If enabled, retains all original columns; otherwise, shows only the result  |

---

## Sample Input

| ID  | Data                                     |
| --- | ---------------------------------------- |
| 1   | {"user": {"name": "Alice", "age": 25}}   |
| 2   | {"user": {"name": "Bob", "age": 30}}     |
| 3   | {"user": {"name": "Charlie", "age": 28}} |

---

## Sample Configuration

| Field            | Value          |
| ---------------- | -------------- |
| Column Name      | Data           |
| Output Column    | ExtractedValue |
| JSON Path        | `$.user.name`  |
| Include Original | No             |

<!-- ![alt text](extract-with-json-path-img.png) -->

---

## Sample Output

| ExtractedValue |
| -------------- |
| Alice          |
| Bob            |
| Charlie        |

---

> You can extract nested elements using dot notation, arrays with `[index]`, and even filter expressions depending on your use case.  
> For example: `$.users[0].name` or `$..name`
