I agree, this is hardcore!
I moved forward littlebit with my "problem" and got now joining messages as follow:
[{"id":"c14ed17f.70b7a","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"a2ff22c.40424e","type":"inject","z":"c14ed17f.70b7a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"main_time","payload":"","payloadType":"date","x":220,"y":120,"wires":[["21aeb3df.901b6c"]]},{"id":"3b443659.2f5a5a","type":"inject","z":"c14ed17f.70b7a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"bedroom_state","payload":"0","payloadType":"num","x":200,"y":280,"wires":[["96e0dcfd.3a082"]]},{"id":"7d05e6e.6f34e18","type":"inject","z":"c14ed17f.70b7a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"main_state","payload":"1","payloadType":"num","x":190,"y":160,"wires":[["21aeb3df.901b6c"]]},{"id":"c9266feb.9b0cb","type":"inject","z":"c14ed17f.70b7a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"bedroom_time","payload":"","payloadType":"date","x":230,"y":240,"wires":[["96e0dcfd.3a082"]]},{"id":"21aeb3df.901b6c","type":"join","z":"c14ed17f.70b7a","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":470,"y":160,"wires":[["faf7569b.77cd18"]]},{"id":"96e0dcfd.3a082","type":"join","z":"c14ed17f.70b7a","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":470,"y":240,"wires":[["faf7569b.77cd18"]]},{"id":"faf7569b.77cd18","type":"join","z":"c14ed17f.70b7a","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":630,"y":200,"wires":[["2bbfd490.2511dc"]]},{"id":"2bbfd490.2511dc","type":"debug","z":"c14ed17f.70b7a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":820,"y":200,"wires":[]}]
it produces JSON object:
{
"main_state":{
"main_time":1598850426209,
"main_state":1
},
"bedroom_state":{
"bedroom_time":1598850427518,
"bedroom_state":0
}
}
but what I would like to do is:
{
"main":{
"time":1598850426209,
"state":1
},
"bedroom":{
"time":1598850427518,
"state":0
}
}
Is it possible please?