Multi msg.payload for dashboard template

hi, i need help for dashboard template.
i read this: Msg.payload from multiple nodes to ui_template
and i use join for create an array for my data and then exracted like this: = msg.payload[0];
msg.two = msg.payload[1];
and its work. but the problem is somtimes data write in 0 and somtimes write in 1.
so how can i set a data alway set in 0 or 1
i need i musy create object, right?
can i create an data like object like this:
var newMsg = {};
newMsg.payload = {
weather: "Rain",
temp_maxc: 25.5,
temp_minc: 18.3,
humidity: 53,
pressure: 1000

You could use a topic in your source data

if( msg.topic == "something"){ = msg.payload
1 Like

thank you so much.