Msg.payload assumption

Indeed you can use an expression in your switch node, and compare the results to match a set of output ports -- something like this, for instance, to detect some dewpoint condifion:

image

The switch then sends the payload to port 1 if true, or port 2 if the condition is false:

image

And there is no reason why the expression could not return many "levels" of output (e.g. quartiles) that match up to multiple output ports -- much like a big "case" statement, but cooler!

2 Likes

Thanks, I am aware. I am mostly referring to the "new" has key option in the switch node, which makes it possible to 'route' by the key name.