in my flow I receive messages via TCP. The payload is for example 1:::Hello World
Now I want to split the payload into an array where array = 1 and array = Hello World.
I do so by using a function. The input of the function node is connected to the output of the tcp_in.
The function code is:
var IDs = msg.payload.split(":::")
But if I run this I get a "TypeError: msg.payload.split is not a function"
I also tried this:
var smsg = msg.payload
var IDs = smsg.split(":::")
but with the same result
Does anyone have an idea?
Thanks in advance