手表属性值中间有个原点watch.current_address,nodered节点写成 "current_address": msg.data.attributes.watch.current_address,报错:TypeError: Cannot read properties of undefined (reading 'current_address')没有原点的属性读取没问题。
-------------
问了ai,解决了:
To access the `watch.current_address` property in Node-RED, you need to understand how messages work in Node-RED and how to access their properties.
In Node-RED, messages are JavaScript objects that can have any set of properties. The most commonly used property is `payload`, but Node-RED also adds a property called `_msgid` to identify the message's progress through a flow [[1]](https://nodered.org/docs/user-guide/messages).
To access the `watch.current_address` property, you need to follow these steps:
1. Pass the message containing the `watch.current_address` property to a Debug node.
2. In the Debug sidebar, you can view the structure of the message and explore its properties.
3. Hover over the `watch.current_address` property and click the copy button to copy its path to your clipboard [[1]](https://nodered.org/docs/user-guide/messages).
Once you have the path to the `watch.current_address` property, you can use it in a Change or Function node to access and manipulate the property as needed.