I.m sure this has been asked before but can't find a solution and tried searching for the relevant javascript solution but didn't help. I'm trying to get 2 values out of a function and get "Function tried to send a message of type string"
Function code below.
global.set("pushed", 1);
global.set("override", 0);
var p = global.get("pushed");
p=p.toString();
var o = global.get("override");
o=o.toString();
var msg1=msg.payload;
var msg2=msg.payload
msg1.payload=p;
msg2.payload=o;
return [ msg1 , msg2 ];