If i understand correctly.
This will take the last part of topic and create a msg.payload.<topic_last_value>.
I would suggest not using spaces in topic paths, best to use _, as the spaces in property names will cause issues later on.
[{"id":"b377b8bf3c14e88e","type":"inject","z":"058fb5958f470e48","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"my/topic/paath/sting_mode","payload":"test","payloadType":"str","x":210,"y":100,"wires":[["f9d571f2c3aed726"]]},{"id":"f9d571f2c3aed726","type":"function","z":"058fb5958f470e48","name":"function 15","func":"const property_name = msg.topic.split(\"/\").slice(-1)[0];\nmsg.payload = {[property_name]: msg.payload};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":100,"wires":[["2be82c233353dfa2"]]},{"id":"2be82c233353dfa2","type":"debug","z":"058fb5958f470e48","name":"debug 102","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":490,"y":180,"wires":[]}]
Payload output
{"sting_mode":"test"}
p.s. It is best to supply data in a copyable form, the debug node offers a way to copy values, hover you mouse to side of property name and a copy value icon will appear.