I'm trying to retrive a JSON string from a JSON object I'm recieving from my MQTT broker. However, when using the following function node:
msg.payload = msg.MAC_Address;
return msg;
I get the following error:
12/02/2021, 17:14:20[node: 18937695.b6aa59] client1/default/default/birth/0d:1e : msg.payload : undefined
undefined
The JSON object looks as follows:
{"MAC_Address": "00:0a:95:9d:68:16", "Manufacturer": "bigboiteam", "MCU": "MSP430FR4133", "Device": "RGB_Bathroom_Light"}
I've never used JSON or javascript and couldn't find anything.
Here are the debug messages:
and here is the flow: