I've been down the JSON
track a bit.
When using MQTT
at the remote end I need to pass the data through a JSON
node to see the sub sections.
Hoping I have got the idea good, I embarked on this new quest. Partly inspired by my JacaScript curiosity.
I'm wanting to process incoming messages. Usually from MQTT
.
So I can cheat and put them through the JSON
node and get their sub-sections, like:
msg.payload.part1
msg.payload.part2
msg.payload.part3
Too easy.
But then I fell over, flat on my face.
This works fine with stuff sent over MQTT
, but not for local stuff.
I don't know how to make messages like they are after coming out of the JSON
node (and MQTT
)
I'm sure there is a way, and I probably have been told.
Just with all the new stuff going in, some stuff got moved (in the brain) and I can't remember.
Other than putting it through MQTT
, is there a way to get a message in that kind of structure?
I've tried putting it through the JSON
node, but it doesn't do what I want.
Thanks in advance.