# Node setter (mutable)

_\[data/tree/Node setter (mutable)]_

![icon](https://194314778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOmQPjVtTIrv8THOJrdC8%2Fuploads%2Fgit-blob-a6efea1d42b12b01fb0a43db35fb803cf0a53764%2F89f4fde2-5391-4f4c-b55a-55ada280f89c.png?alt=media)

***

Sets a node at the specified path of the tree. Mutates input.\
\
Warning! This node mutates the tree it gets that means if any other node received the same tree as input from the original source it may get the modified tree depending on the execution order!\
\
Example:\


1. {"foo": {"bar": 1\}}@0 is received via `tree`\

2. \["foo", "baz"]@0 is received via `path`\

3. 1@0 is received via `node`\

4. {"foo": {"bar": 1, "baz": 1\}}@0 is sent via `modified tree`\


***

**Keywords**: tree, set, setter

### Input ports

*   **tree**: `(any[] or {string: any})`

    Tree data structure in which to store a node.\
    \
    Will be mutated.\

*   **path**: `(string or number)[]`

    Receives the path segments where the `node` should be written to\

*   **node**: `any`

    Receives the node to be set\


### Output ports

*   **modified tree**: `(any[] or {string: any})`

    Sends the modified tree\
