Get value from xml


#1

Hi. Just started with node red. So I maybe not explaining right but I will give it a try. I have read for hours to solve this problem but can't get a solution. I am starting with a http request to get the xml. Then I use the xml node to convert it to json. I have copied the patch to the value I wan. And used that path in a function node. Somehow I want to know the value in motor_lock_state if its locked or unlocked. Attach som screenshots. Hope you understand what I mean.


#2

Close . I think you just need

msg.payload = msg.payload.controller.... and the rest of your first line...
I.E. assign that value into msg.payload then return it.


#3

...and to be sure what would be the rest of your first line you could click on this little button indicated by the red arrow and past the result in your function node.

r-01


#4

Works!!!!

Thank you wery much!

/Niclas