> For the complete documentation index, see [llms.txt](https://docs.ondiagram.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ondiagram.com/nodes/mapper.md).

# Mapper

## General

The `Mapper` node can be used to easily map from one data type to another. All functionality of this node can also be done with link mapping.&#x20;

{% hint style="info" %}
For more complex transformation the `Code` node can be used.
{% endhint %}

## Input

* **Source:** Receives an `Object` or a value type eg. `String`, `Number` or `Boolean` with the values to map. Learn more on [object-mapper](https://www.npmjs.com/package/object-mapper).

*Examples:*

* Object ➡ Object&#x20;

`"bar.foo": "baz"` & `{"baz": {"foo": "*value*"}}` ➡ `` {"baz": "*value*"}` ``

* Object ➡ Value&#x20;

`"foo[0].bar"` & `{"foo": [{"bar: *value*"}]}` ➡ `*value*`

* Value ➡ Object&#x20;

`*value*` & `"foo[0].bar"` ➡ `{"foo": [{"bar: *value*"}]}`

## Output

* **Out:** Returns an `Object` or a value type eg. `String`, `Number` or `Boolean` with the mapped values. Learn more on [object-mapper](https://www.npmjs.com/package/object-mapper).

## Use Cases

Register a user to a database.

* Request (Post) ➡ Mapper (Get) ➡ Response (200)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.ondiagram.com/nodes/mapper.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.
