logologo
Get Started
Guide
Development
Plugins
API
English
简体中文
Get Started
Guide
Development
Plugins
API
English
简体中文
logologo
Workflow
Overview
Getting Started

Triggers

Overview
Collection Event
Schedule
Pre-action Event
Post-action Event
Custom Action Event
Approval
Webhook

Nodes

Overview

AI

Large Language Model

Flow Control

Condition
Loop
Variables
Parallel Branch
Subflow
Output
Delay
End

Calculation

Calculation
Date Calculation
JSON Query
JSON Variable Mapping

Data Operations

Create Data
Update Data
Query Data
Delete Data
SQL Operation

Manual Processing

Manual Processing
Approval
CC

Extended Types

HTTP Request
JavaScript
Notification
Send Email
Response
Response Message
Variables
Execution History
Version Management
Advanced Options

Extension Development

Overview
Extending Trigger Types
Extending Node Types
API Reference
Previous PageJSON Query
Next PageCreate Data

#JSON Variable Mapping

v1.6.0

#Introduction

Used to map complex JSON structures from the results of upstream nodes into variables for use in subsequent nodes. For example, after mapping the results of SQL Action and HTTP Request nodes, their property values can be used in subsequent nodes.

Tip

Unlike the JSON Calculation node, the JSON Variable Mapping node does not support custom expressions and is not based on a third-party engine. It is only used to map property values in a JSON structure, but it is simpler to use.

#Create Node

In the workflow configuration interface, click the plus (+) button in the flow to add a "JSON Variable Mapping" node:

Create Node

#Node Configuration

#Data Source

The data source can be the result of an upstream node or a data object in the process context. It is usually an unstructured data object, such as the result of an SQL node or an HTTP Request node.

Data Source

#Input Sample Data

Paste sample data and click the parse button to automatically generate a list of variables:

Input Sample Data

If there are any variables in the automatically generated list that you don't need, you can click the delete button to remove them.

Tip

The sample data is not the final execution result; it is only used to assist in generating the variable list.

#Path Includes Array Index

If not checked, the array content will be mapped according to the default variable handling method of NocoBase workflows. For example, input the following sample:

{
  "a": 1,
  "b": [
    {
      "c": 2
    },
    {
      "c": 3
    }
  ]
}

In the generated variables, b.c will represent the array [2, 3].

If this option is checked, the variable path will include the array index, for example, b.0.c and b.1.c.

20250113184056

When including array indices, you need to ensure that the array indices in the input data are consistent; otherwise, it will cause a parsing error.

#Use in Subsequent Nodes

In the configuration of subsequent nodes, you can use the variables generated by the JSON Variable Mapping node:

20250113203658

Although the JSON structure can be complex, after mapping, you only need to select the variable for the corresponding path.