Filter a Payload

Hello Guys,

How can i Seperate the Last part of my Message that i only forward the part in the Circle ?

That i only send “0” or in the Second “81” to the next node

point

Thx

I would probably go about writing parsing code in a function node. Not sure if you need help doing that. It would probably need some for and if loops to find the last “.” in a character array, then return just the bytes after it (minus the trailing /0 if you need an integer or other non-string).

Ok i guess i wont get that done by my self , for me that sounds rly complicated, iam Just a Beginner with that Node Red.

image

[{"id":"79f7b0f8.8c0a8","type":"inject","z":"ffbd7f06.4a014","name":"","topic":"","payload":"20.100.81","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":176,"y":800,"wires":[["eb87120f.045f5"]]},{"id":"eb87120f.045f5","type":"split","z":"ffbd7f06.4a014","name":"","splt":".","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":306,"y":800,"wires":[["2c99f5ef.b51fea"]]},{"id":"d1a38687.d53758","type":"debug","z":"ffbd7f06.4a014","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":582,"y":800,"wires":[]},{"id":"2c99f5ef.b51fea","type":"switch","z":"ffbd7f06.4a014","name":"","property":"payload","propertyType":"msg","rules":[{"t":"tail","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":432,"y":800,"wires":[["d1a38687.d53758"]]}]
1 Like

Perfect thx a lot that works fine!