Hi, I'm trying to create a function that receives a split message, converts the message into variables and looks at a condition of the message to perform an action, but I always get a syntax error and I don't understand why, can someone help me correct this, thank you. here I leave the code.
var id = global.get("serial");
var s = msg.parts.index(0);
var f = msg.parts.index(1);
var e = msg.parts.index(2);
if (s == id) {
msg.payload = + f + e;
return msg;
}
else {
msg.payload = null;
}
Tanks...