Update
Information about the Update node, which is used to make transformations to complex data structures.
The Update node can be used to make changes to complex data in an easy way. In the example below, we append a string to the value of a nested object.

Update has three (+ 1) inputs:
inputis the data you want to make changes tothe second input is a path expression that specifies a sub part of the object to change.
valueis the new value we want to put at that positionYou can also change between various update modes using the dropdown in the header
Appendappendsvalueto the original value (like in the example above). For strings and lists this means they get concatenated.Replacereplaces the original value withvalueRemoveremoves item pointed to by the path expression. In this case, thevalueinput is not used for anything.
Benefits of using the Update node
The update node makes is super easy to make changes to complex objects, but an added benefit is that it does so without changing the original object, but instead returns a new one, which is a complete clone of the original input object, but with your specified update. This help prevent unintended side effects, making your flows more predictable and easier to debug.
Path expressions
Path expressions describe accessors for parts of complex objects. The . operator is used to access fields of objects, while the index operator [<index>] is used to access items in lists or characters in strings. Path expressions also support expressions in the indexer position, which can be used to calculate offsets or retrieve values based on inputs or variables. Here are some examples.
Change the age field of the third user item

Append a token to the content field of object described by an id

More valid path expressions
input[a + b].foo- using inputs (aandb) in the path expression gives additional inputs to the update node that you can connect toinput- leaving just the input part just returns the existing objectinput["hello"]- the hello field of an object like{ hello: "there" }
Last updated
Was this helpful?