How do i continuosly update the payload?

Hello, I have an inject node that injects every x seconds a Json string,and I have a function node which operates on the json string, and i want to save those changes in order to have the updated json string every time it injects. How can I do that?

Welcome to the forum!

Store the JSON in a Global varable.

Thank you, I actually did try using a flow/global variable but I was doing something wrong.
Instead of writing

msg.payload = flow.get("payload");

I was writing

msg.payload = flow.payload;

So now it works.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.