Search code examples
javascriptnode-red

node-red ReferenceError: la is not defined (line 1, col 8)


How can i send variables form function to function

First function

Second function


Solution

  • The input message to a function node is always called msg (no matter what you may have called it in a previous function node).

    So in the example you have given to access the payload of the incoming message in the second function node you would just use msg.payload. (so in this example the second function node is redundant, but I expect you are actually doing more than is shown)