Using a value after a spit node

I feel I understand the basics, with using a value from a message, but at a loss on how you choose one message from a stream after a split node.

I am using a SNMP-table node and using a split, which works well, but the payload "stream" is 16 msgs all with a payload. Using the attachment how would ask for payload[3] for only msg 9 (as highlighted)?

At the moment I am just trying to output this to debug (not sure if that possible)

You pick out something recognisable and compare that using a switch node. In your case here, topic would be == to the string 9

As for then getting the item 3 of payload, use a change node to Set the value of msg.payload to the value of msg.payload[3] (or just use msg.payload[3] in your next node if it permits that)


tip to help you getting correct path to an item

There’s a great page in the docs (Working with messages : Node-RED) that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

BX00Cy7yHi

2 Likes