Node-red - need a multi-input function for a number value

Viewed 4172

So I'm just getting to grips with node-red and I need to create a conditional global function.

I have two separate global.payloads set to a number value of either 0 or 1.

What I need to happen now is, if global.payload is equal to value 1 then follow this flow, if it is equal to value 0 then follow this one.

I'm just a little confused with the syntax for the function statement. Any help gratefully appreciated.

2 Answers
Related