hi all, im sure this is a rookie question but...
why is it when i sometimes try to create a new property such as the below screen shot that the new property doesn't get created ?
Im using a change node to create a " msg.payload.data.entity_id " property from the topic but as you can see from the debug screen it doesn't
get created and as a newbie i'm not sure why/
Appreciate your guidance to probably a simply question
msg.payload can’t be a variable and an object at the same time.
So you rules can’t work as you want.
If you wanted msg.payload to be an object you can use the move
option to move msg.payload to msg.payload.whatever and then set other properties of the msg.payload object
thanks for that ukmoose. as per below i did my best at interpreting what you said and got it working as intended so that's awesome thanks. I will now do some research to actually get my head around why it worked.. IE: research differences between objects and variables etc
cheers
No probs, an understanding of javascript objects and arrays (and variables) is very useful for Node-RED.
1 Like