
The Add node adds a key and a value (key-value pair) to a Map, thereby increasing the length of the Map. When adding a key-value pair to a Map, the node checks whether the added key is equal to an existing key in the Map. If the new key is equal to a key that's already in the Map, the existing value associated with the key will be overwritten with the new value. After this node has completed its operation, the key is guaranteed to be associated with its corresponding value until a subsequent mutation of the Map.
Inputs
Pin Location | Name | Description |
---|---|---|
![]() |
(In) Exec | Input execution pin. |
![]() |
Target Map | The Map that you want to add a new key-value pair to. |
![]() |
Key | The key being used to lookup a value in the Map. |
![]() |
Value | The value being stored in the Map for subsequent retrieval. |
Outputs
Pin Location | Name | Description |
---|---|---|
![]() |
(Out) Exec | Output execution pin. |
![]() |
Boolean Return Value | If the value was added, the node returns true. Otherwise, if the key was already present, resulting in its associated value being overwritten, the node returns false. |
Example Usage
