> ## Documentation Index
> Fetch the complete documentation index at: https://docs.refold.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Transform Node

The Transform node in Refold allows you to manipulate and transform complex JSON data into a more accessible format using **JSONata expressions**.

<Tip>
  If you want to learn about JSONata expression, refer [here](https://jsonata.org/).
</Tip>

## Node Functionality

Transform node acts as a object/array data modifier or filter in the workflow. It can:

* Simplify complex objects into simple structures;
* Perform mapping of fields; &
* Extract particular keys from objects;

## Input Fields

The Transform node offers two input fields:

<Note>
  Please note that both the input and query fields are required for the Transform node to function properly.
</Note>

### Input

This field accepts a JSON object, where the Array needs to be given and can be selected from a **DataSlot** or a previous **Node** in the workflow. It serves as the input data for transformation.
The format of the **Input** can be in the format:

```javascript theme={null}
{
  "input": "{Array_name}" // When you have the Array
  "input": "{{Node_name: data}}" // When you want to fetch response of a previous node.
  // The Node_name is selected by using Nodes in Variables

  // "input" and "data" key can be replaced by any other word like result etc.
}
```

### Query

In this field, users need to provide a valid [**JSONata expression**](https://jsonata.org/) to query or transform the input object. The expression structure in Query is given below.

```javascript theme={null}
{
  "output": "JSONata expression" 
  // The key should be "output" in Query field.
}
```

<Info>
  If only the JSONata expression is provided in Query field rather than an object, then the node will give an empty response and result cannot be used in further nodes of the Workflow.
</Info>

<img height="200" src="https://mintcdn.com/cobalt-55/lcADCqUGrbz-iIZQ/images/Guides/Workflow/transform-node.png?fit=max&auto=format&n=lcADCqUGrbz-iIZQ&q=85&s=5e15ae47b8809717f794860ecc1667b9" alt="Transform Node in Refold" data-path="images/Guides/Workflow/transform-node.png" />

By leveraging the Transform node in Refold workflows, users can efficiently process and manipulate JSON data. Whether extracting specific information or performing complex transformations, the Transform node offers a powerful tool for managing JSON data within workflows.
