I have a context variable and would like to create a JSON object as a new context variable where the previous context variable value is inserted. How should that be written?
Imagine the simple example below
The first inject node just sends a "Hello" string to a change node that sets the received payload to the flow.out variable. The second inject node should trigger the creation of a new variable as a JSON object where the value of the first should be included. But obviously I fail in trying different variants like
{"captured":flow.get('out')}
(a wish this should work but it will of course not)
In JSONATA the method to do this is simple, $flowContext('out')
but what would be the correct syntax in my example above?
Greatful for any hint!