Search code examples
node-red

node-red return all flow variables


Is there anyway, using function, the return all flow variables?

My scenario is: I have a functions creating flow variable for each device connected, I want to get this variables to do future processing.


Solution

  • You can use flow.keys() to get a list of the names of all flow context variables.

    Reference: https://nodered.org/docs/user-guide/writing-functions#flow