Skip to content

Filter attributes with node red #118

Answered by Ascotg
Ascotg asked this question in Q&A
Discussion options

You must be logged in to vote

I found my own answer (in hindsight, I'm really a newbie to Node-Red):

When polling 'get entities' you get an object (what's in a name) where you can copy information out of by selecting the correct path.

In my case that was : msg.payload[0].attributes.prices[0].price

You can find more info on objects and paths to info in an object here:
https://nodered.org/docs/user-guide/messages

Here's my node red flow:

[{"id":"aaf8249566ac4136","type":"inject","z":"6407955a01e5b2fa","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":260,"y":320,"wires":[["a39eda9e97a5cd11"]]},{"id":"a572c0d…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Ascotg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant