Hi and welcome to the forum.
You would use a join node to join message streams into a single message.
here is a example it use a simple Jsonata expression to get the mqtt final path element, and use that to create the object.
e.g
[{"id":"fcc4b529731fda3f","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic/stateOfChange","payload":"20","payloadType":"num","x":260,"y":7760,"wires":[["1eec6c61bbe8e391"]]},{"id":"1eec6c61bbe8e391","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"$split($$.topic, \"/\")[-1]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":7780,"wires":[["158b250490ab597b"]]},{"id":"0817d1086bad6b9b","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic/CurrentPower","payload":"20","payloadType":"num","x":260,"y":7820,"wires":[["1eec6c61bbe8e391"]]},{"id":"158b250490ab597b","type":"join","z":"d1395164b4eec73e","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":630,"y":7780,"wires":[["80c69075d2a5448b"]]},{"id":"80c69075d2a5448b","type":"debug","z":"d1395164b4eec73e","name":"debug 2575","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":7780,"wires":[]}]
How to import/export a flow
Or if you want to turn each message from the mqtt node into and object with one property.
[{"id":"fcc4b529731fda3f","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic/stateOfChange","payload":"20","payloadType":"num","x":260,"y":7760,"wires":[["1eec6c61bbe8e391"]]},{"id":"1eec6c61bbe8e391","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"$split($$.topic, \"/\")[-1]","tot":"jsonata"},{"t":"move","p":"payload","pt":"msg","to":"payload[msg.topic]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":7780,"wires":[["80c69075d2a5448b"]]},{"id":"0817d1086bad6b9b","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic/CurrentPower","payload":"20","payloadType":"num","x":260,"y":7820,"wires":[["1eec6c61bbe8e391"]]},{"id":"80c69075d2a5448b","type":"debug","z":"d1395164b4eec73e","name":"debug 2575","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":7780,"wires":[]}]