Thanks in advance,
Here is a snippet of a flow I am working with (newbie to node-red)
here is the function code I am using
var newMsg = {
"topic": "INSERT INTO SENSORDATA VALUES ( " + msg.payload.time + ", " + msg.payload.id + ", " + msg.payload.type + ", " + msg.payload.data + ")"
}
return newMsg;
Here are the debug messages
3/5/2023, 10:42:13 PMnode: debug 5
fdrs/data : msg.payload : Object
{ id: 1, type: 1, data: 22.06900024, time: 49534 }
3/5/2023, 10:42:13 PMnode: debug 7
INSERT INTO SENSORDATA VALUES ( 49534, 1, 3, 53) : msg.payload : undefined
undefined
My question is why do I have the msg.payload undefined error? The data seems to have been transferred correctly, so I am not sure what the problem is?