Ok, I've been called up a few times that I do things back to front when filtering messages.
If I am looking for a message that isn't of a certain type I find all messages of type and send them to output #1 of the switch
node.
Then for output #2 I have the otherwise
set.
And then connect to the second output.
Yeah, maybe not the best way.... But this one came up today.
I am getting messages and there are two versions of the message. (Topics different)
So I get (example)
topic
1
topic
2
topic
3
topic
4
topic
second1
topic
second2
topic
second3
topic
second4
I want to ignore all messages with second
in them.
I can't see an easy way to use the switch node other than how I do it by default.
Basic config:
msg.topic
if msg.topic contains second
--> output 1
otherwise
--> output 2
And I use output 2.
That is the easiest way - yeah?