# Data Transformation

#### **Data Selection**

In this section, you specify the path from which the object or array data will be taken for the transformation process.

**Example: Object Type**\
If you want to transform an existing object into a new object while retaining its current key-value pairs, consider the following:

* **Old Object**: `{"id":4,"name":"vasanth","is_active":true}`
* **New Object**: `{"id":4,"name":"vasanth","is_active":true, "email":"contact@fireapis.com"}`

You will select the path from which the old object should be accessed in the Data Selection section. For dynamic data, you can click the plus (+) icon next to the input field to load the data source model, allowing you to pull in data dynamically.

<figure><img src="/files/AZeLR5CNfSd5tCS8OFku" alt="Data selection in data transformation section"><figcaption><p>Data selection in data transformation section</p></figcaption></figure>

#### Form Data

This section allows you to configure how the new object should be created.

Continuing with the previous example, you can add keys and their values to form the new object. For instance, you could add a key named `email`, and select the path or source from which to pull that value. Again, for dynamic data, use the plus (+) icon to access the data source model for easy selection.

<figure><img src="/files/UyxiCG4aflZeNKicWnTi" alt="Form data section in data transformation"><figcaption><p>Form data section in data transformation</p></figcaption></figure>

Below, we have attached a detailed explanation for this action.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fireapis.com/the-basics/logics/actions/data-transformation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
