# Set Dictionary Element

## Overview

![The Set Dictionary Element Node.](https://926825830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKQhJdUBr7YQzfIwmpAZ9%2Fuploads%2Fgit-blob-d516c566f835a4f14bfaecb0f80a5a44aeee0065%2Fsetdictionaryelementupdatedimage.png?alt=media)

**Set Dictionary Element** updates one or more elements in a **Dictionary** to new values. For this, it receives the `Key` of the element to update to and the `Value` to which it will be updated.

If the `Key` does not exist in the **Dictionary**, it creates a new (`Key`, `Value`) pair.

[**Scope**](https://docs.incari.com/incari-studio/2022.1/overview#scopes): **Project**, **Scene**, **Function**, **Prefab**.

## Attributes

![The Set Dictionary Element Node Attributes.](https://926825830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKQhJdUBr7YQzfIwmpAZ9%2Fuploads%2Fgit-blob-3986ac20a13bae12ef7992c5f6801d8fd253363a%2Fsetddictionaryelementattributes.png?alt=media)

### Inputs

`Inputs` - The number of elements you wish to set the value of. Each **Input** element has the following **Attributes**:

| Attribute       | Type                                         | Description                                                                                                    |
| --------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `Key`           | **String**                                   | The default `Key` of the element you wish to update if no value is provided in the `Key` **Input** **Socket**. |
| `Data Type`     | **Drop-down**                                | The `Data Type` of the `Key` element you wish to update.                                                       |
| `Default Value` | *Defined in the* `Data Type` ***Attribute*** | The element whose `Key` is specified in the `Key` **Attribute** will be updated with this value.               |

## Inputs

| Input                   | Type                                          | Description                                                                                 |
| ----------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------- |
| *Pulse Input* (►)       | **Pulse**                                     | A standard **Input Pulse**, to trigger the execution of the **Node**.                       |
| `Dictionary (optional)` | **Dictionary**                                | A **Dictionary** whose element/s you wish to update.                                        |
| `Key`                   | **String**                                    | The `Key` of the element you wish to update.                                                |
| `Value`                 | *Defined in the* `Data Type` ***Attribute***. | The `Value` that will be associated with the `Key` given in the `Key` **Input** **Socket**. |

## Outputs

| Output             | Type           | Description                                                                                                                            |
| ------------------ | -------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Output* (►) | **Pulse**      | A standard **Output Pulse**, to move onto the next **Node** along the **Logic Branch**, once this **Node** has finished its execution. |
| `Dictionary`       | **Dictionary** | An **Output** **Dictionary** whose element/s have been replaced with the desired values.                                               |

## See Also

* [**Dictionary Value**](https://docs.incari.com/incari-studio/2022.1/toolbox/dictionary/dictionary-value)
