Adding values after a join object

Hi,
I want to add some values but I don´t find the mistake why it doesn't work.

after the join I get 2 objects:


I can only work with the values of the first object "PAC1" and "PAC2", the values in the object ["f52b72ff.9cc7"] are not available. I don´t know why.

the values from the object "f52b72ff.9cc7" comes diect from the output of the buffer parser:

First off might I offer you a suggestion...if you added some link nodes your flow wouldn't look so confusing.

Not having the actual flow, the pitcure seems to indicate there are threemsg's able to get to the join.

You say the the values in the object ["f52b72ff.9cc7"] are not available. I see no reference to that object is what you have provided.

My second suggestion is you add a debug node to the output of each of the nodes connected to the join. Once you have captured the data, you could create a small flow where you have three inject nodes setting up msgs with the data you captured in the debug nodes and feed that into a copy of the join node and connect that to a debug node.

That way you could provide a small flow that reproduces your issue and make it easier for someone to help you.

How are you trying to access the object?

sorry for that chaos.
I solved it another way: after the buffer parser I extracted each value I need in a function node:

msg.payload = msg.payload.PACeinL1
msg.topic = "PACeinL1"
return msg;

I joined all of these with no problem.

1 Like

but I would still be interested in how I get the values that are in the object "f52b72ff.9cc7" you can see in the first picture (UL1 .... Qges).

Because the name has a dot in it you cannot use the shorthand method of access by something like msg.payload.f5blabla.9c7.UL1. You have to use msg.payload["f5blabla.9c7"].UL1

1 Like

thank you
do you know how I could rename the object topic in something other f5blabla.9c7" -> "obj1"

Put a change node before the join node that Sets msg.topic to whatever you want.
Where does that topic come from originally?

from the buffer parser

Did you look at the help text for that node to find why the topic is set to that? Looking there I see
" set topic When false, msg.topic will be unmodified. When true, msg.topic will be set to the value of name"
So I deduce from that that you have selected Set Topic in the nodes config, but have not given the node a name, so the topic is defaulting to the node's id. The solution is therefore to give the node a name, or if the incoming message has a meaningful topic then deselect Set Topic so that topic will be passed through. It is generally good practice to give nodes a name anyway, in order to help with debugging and also to make the flow more readable.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.