Help with function node


Have tried to get this work for a while now. Have read the documentation on the function node but I don't get how to solve this. I want multiple expressions I one node with an output for each expression.

Hi @niclas.w82

your code is close but does need a couple changes.

At the moment you are creating four messages whose payloads are the literal strings "", instead of looking up the value of those properties from the received message.

You should change those lines to be:

var msg1 = { payload: };

(obviously use the full property path, I'm just not going to type the full thing out from a screenshot)

Then, your return statement should be:

return [ msg1, msg2, msg3, msg4 ];

in order to send each message to the corresponding node output.

Thank you wery much!!!

Work perfect!