I have a problem, I want to move value of Object[0] nazwa, which is a result of query (let's say "ab" in this case) to another variable, however I'm new to red node and JS, so I don't know how to do it. Could anyone be so kind and would help me? Right now I have it in function like so:
global.set("zmienna",msg.payload.Object[0].nazwa)
but it does not work.
global.set("zmienna", msg.payload2[0].nazwa);
Explained:
payload2
is an array, while
payload
is a string, so you are probably referring to that
variable.