Hi Oracles!!
I have a problem with the syntax needed to manipulate message contents...
Coming into a function node, I have a msg.payload of True or False, and a message topic-ie "powerOn"
I need to manipulate this info to give me an output of: "msg.payload.powerOn" where its value would be the boolean as received... The "powerOn" suffix is a variable depending on what is selected elsewhere on a dash....
Any help would be immensely appreciated!
TIA
Ed
Edit: For sake of clarity-
mysuffix = msg.topic
Data = msg.payload
msg.payload.(whatever is stored in mysuffix) = Data
return msg;