---
title: "JSON Variable Mapping"
description: "Explains the path parsing and variable output methods of the JSON variable mapping node."
---

# JSON Variable Mapping

## Node Type

`json-variable-mapping`

## Node Description
Parses arbitrary JSON data into structured variables for reference by subsequent nodes.

## Business Scenario Example
Map the raw JSON from a webhook into clear variables for use by subsequent nodes.

## Configuration List
| Field | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| dataSource | any | None | Yes | JSON data source (variable or constant). Variables should follow [Common Conventions - variables](../conventions/index.md#variable-expressions). |
| example | object/array | None | No | JSON example, used only by the UI to parse and generate mapping items. |
| parseArray | boolean | false | No | Whether to include array indices in the path (e.g., `items.0`). |
| variables | array | [] | No | List of mapping items, usually generated by the parse button. |
| variables[].path | string | None | Yes | JSON path. |
| variables[].alias | string | None | No | Mapping alias (for display). |
| variables[].key | string | None | No | Output variable key (a unique key generated by the UI). |

## Branch Description
Branches are not supported.

## Test Support
Not supported. This node cannot use CLI `workflow flow-nodes test` or HTTP `flow_nodes:test`, because the server-side instruction does not implement `test()`.

## Example Configuration
```json
{
  "dataSource": "{{ $context.data.payload }}",
  "parseArray": true,
  "variables": [
    { "path": "user.id", "alias": "User ID", "key": "user_id" },
    { "path": "items.0.name", "alias": "First Item Name", "key": "first_item_name" }
  ]
}
```

## Output Variables
The variable selector for this node is a tree array of `{ label, value, children? }`. At runtime, join the `value` segments with `.` and prepend `$jobsMapByNodeKey.<nodeKey>`.

- The root is the current node key.
- Each child path uses `variables[].key`; `variables[].alias` and `variables[].path` are display or parsing metadata only.
- Example references for the sample configuration above: `{{$jobsMapByNodeKey.json_map.user_id}}`, `{{$jobsMapByNodeKey.json_map.first_item_name}}`.
