Converting *entire* msg object to JSON

Worked beautifully. In case someone stumbles across this, my flow was as follows:

Outbound: A function node with

var payload = JSON.stringify(msg);
node.send({payload});

going into a TCP out node set to connect to a specific port and close connection after each message.

Inbound: A TCP In node set to listen on the same specified port and output a single string, which then goes to a function node containing:

msg = JSON.parse(msg.payload);
return msg;

Many thanks to TotallyInformation for answering in a way that put me on the right path but was just far enough from hand-holding to make me have to bash my head against it to learn a bit.

3 Likes