oh, thanks for reply.
i thought there is maybe another way to create a complete new message?
maybe set one new property in the change-node with jsonata and adress all from root with $$. anbd create new/change properties? somehow?
maybe i just dont find the correct syntax for this, or realy it is not possible to create with this way a complete new message?
Do you want to generate an extra message (so you end up with two messages one after the other, the original and the new) or do you just want to change everything in the message to something else? If it is the latter then why?
i started to inject a complete newly created message.
the inject-node has some limitations, so i used it only as trigger and in the change-node i started fiddling wit jsonata to see if i can create a new message with new properties. an extra message does not hurt, but in short: i tried to create a complete new message with jsonata.
i still think if one can access $$ than somehow that should be possible. all recipes explain mostly the jsonata-inner functions and leave open how to set a new message up from the group and in the gui.
i know think i must use the change node because it has full access $$... but syntax is hard...
You have not explained why you want to generate a completely new message. Why can you not just change the message coming from the inject node to make it contain what you want?
i wanted to understand how to create a new message with jsonata to do it in the middle of my flows.
at least to add some new properties on certain flows...
i just started with the inject-node at the beginning of a testflow..
but i spent hours fiddling with jsonata syntax and had not even luck to create a new message in this simple test-flow...
Oh I see, you specifically want to do it with jsonata rather than setting the individual properties in a change node, or creating a new message in a function node.
exactly. jsonata seems most powerful for a brilliant general solution, and all in the gui. seems for for small coding better to edit and at least better to debug there than mostly a function node. but every 2 weeks i must lookup the (complex?) visualisation and syntax for objects, arrays, properties.. and dont get it straigth right. as now...