This could also be done with a low code recursive flow.
e.g.
[{"id":"6ea593bfad2ff52c","type":"inject","z":"667cec54c048503c","name":"Grid M4","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cfos_mqtt/get/M4","payload":"{\"dev_type\":\"meter_sunspec\",\"device_enabled\":1,\"name\":\"SE Grid-meter\",\"time\":1736096274,\"address\":\"192.168.178.46:1502\",\"id\":1,\"dev_id\":\"M4\",\"number\":34,\"desc\":\"SolarEdge Netzzähler\",\"com_err\":false,\"com_err_secs\":936,\"com_errors\":0,\"status\":\"\",\"last_error\":\"not connected: 192.168.178.46:1502\",\"is_evse\":false,\"used_phases\":7,\"has_history\":true,\"hide_dev\":false,\"show_in_overview\":true,\"show_chart_in_dev_info\":false,\"show_chart_in_overview\":true,\"info\":{\"check\":{\"check1\":{\"imb_avg\":0.7,\"imbalance\":0.7},\"imb_avg\":0.7,\"imbalance\":0.7},\"imb_avg\":0.7,\"imbalance\":0.7},\"factor\":1,\"import\":850315,\"export\":6094494,\"power_w\":234,\"current_l1\":424,\"current_l2\":1037,\"current_l3\":322,\"voltage_l1\":233,\"voltage_l2\":236,\"voltage_l3\":234,\"role\":3,\"model\":\"SolarEdge ,SE10K-RWS48BEN4,0004.0022.0039,1.0,7E1FA837,M203\"}","payloadType":"json","x":130,"y":760,"wires":[["d66deb0ef7c12f3f"]]},{"id":"d66deb0ef7c12f3f","type":"split","z":"667cec54c048503c","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"key","property":"payload","x":270,"y":760,"wires":[["0e6c1c18a3c673a4","b22cdd9842cab55b"]]},{"id":"d5b391448727048a","type":"template","z":"667cec54c048503c","name":"","field":"key_rec","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{key}}_","output":"str","x":700,"y":760,"wires":[["d66deb0ef7c12f3f"]]},{"id":"0e6c1c18a3c673a4","type":"trigger","z":"667cec54c048503c","name":"","op1":"","op2":"true","op1type":"nul","op2type":"bool","duration":"250","extend":true,"overrideDelay":true,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":320,"y":840,"wires":[["769fb55f5e39c1da"]]},{"id":"b22cdd9842cab55b","type":"template","z":"667cec54c048503c","name":"","field":"key","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{key_rec}}{{key}}","output":"str","x":420,"y":760,"wires":[["8a6adf387967742c"]]},{"id":"8a6adf387967742c","type":"switch","z":"667cec54c048503c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"istype","v":"object","vt":"object"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":550,"y":760,"wires":[["d5b391448727048a"],["8998d32448af64fa"]]},{"id":"769fb55f5e39c1da","type":"change","z":"667cec54c048503c","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"complete","tot":"msg"},{"t":"delete","p":"key","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":840,"wires":[["1e0cddd5132fb125"]]},{"id":"8998d32448af64fa","type":"template","z":"667cec54c048503c","name":"","field":"key","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"grid_{{key}}","output":"str","x":700,"y":820,"wires":[["1e0cddd5132fb125"]]},{"id":"1e0cddd5132fb125","type":"join","z":"667cec54c048503c","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"key","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":830,"y":840,"wires":[["e7f18b2b9ac1eab9"]]},{"id":"e7f18b2b9ac1eab9","type":"debug","z":"667cec54c048503c","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":900,"y":800,"wires":[]}]
Which may be easier for you follow the logic of how it flattens the multi layered object. Else you would have to write a recursive function or JSONata expression.
{which you can call from a link call and a queue.
e.g.
[{"id":"51bad935a25a72d0","type":"delay","z":"667cec54c048503c","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":280,"y":800,"wires":[["d66deb0ef7c12f3f"]]},{"id":"1854c596b468501c","type":"link in","z":"667cec54c048503c","name":"flatten_object","links":[],"x":145,"y":800,"wires":[["51bad935a25a72d0"]]},{"id":"a9a0c6e9a19f8e0f","type":"function","z":"667cec54c048503c","name":"function 157","func":"return {flush:1}","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":130,"y":900,"wires":[["51bad935a25a72d0"]]},{"id":"d66deb0ef7c12f3f","type":"split","z":"667cec54c048503c","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"key","property":"payload","x":440,"y":820,"wires":[["0e6c1c18a3c673a4","b22cdd9842cab55b"]]},{"id":"1e0cddd5132fb125","type":"join","z":"667cec54c048503c","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"key","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1000,"y":900,"wires":[["2223455d1663255d","a9a0c6e9a19f8e0f"]]},{"id":"d5b391448727048a","type":"template","z":"667cec54c048503c","name":"","field":"key_rec","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{key}}_","output":"str","x":870,"y":820,"wires":[["d66deb0ef7c12f3f"]]},{"id":"0e6c1c18a3c673a4","type":"trigger","z":"667cec54c048503c","name":"","op1":"","op2":"true","op1type":"nul","op2type":"bool","duration":"250","extend":true,"overrideDelay":true,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":490,"y":900,"wires":[["769fb55f5e39c1da"]]},{"id":"b22cdd9842cab55b","type":"template","z":"667cec54c048503c","name":"","field":"key","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{key_rec}}{{key}}","output":"str","x":590,"y":820,"wires":[["8a6adf387967742c"]]},{"id":"769fb55f5e39c1da","type":"change","z":"667cec54c048503c","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"complete","tot":"msg"},{"t":"delete","p":"key","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":900,"wires":[["1e0cddd5132fb125"]]},{"id":"8998d32448af64fa","type":"template","z":"667cec54c048503c","name":"","field":"key","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{pre}}{{key}}","output":"str","x":870,"y":880,"wires":[["1e0cddd5132fb125"]]},{"id":"2223455d1663255d","type":"link out","z":"667cec54c048503c","name":"link out 10","mode":"return","links":[],"x":1015,"y":820,"wires":[]},{"id":"8a6adf387967742c","type":"switch","z":"667cec54c048503c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"istype","v":"object","vt":"object"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":720,"y":820,"wires":[["d5b391448727048a"],["8998d32448af64fa"]]},{"id":"6ea593bfad2ff52c","type":"inject","z":"667cec54c048503c","name":"Grid M4","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cfos_mqtt/get/M4","payload":"{\"dev_type\":\"meter_sunspec\",\"device_enabled\":1,\"name\":\"SE Grid-meter\",\"time\":1736096274,\"address\":\"192.168.178.46:1502\",\"id\":1,\"dev_id\":\"M4\",\"number\":34,\"desc\":\"SolarEdge Netzzähler\",\"com_err\":false,\"com_err_secs\":936,\"com_errors\":0,\"status\":\"\",\"last_error\":\"not connected: 192.168.178.46:1502\",\"is_evse\":false,\"used_phases\":7,\"has_history\":true,\"hide_dev\":false,\"show_in_overview\":true,\"show_chart_in_dev_info\":false,\"show_chart_in_overview\":true,\"info\":{\"check\":{\"check1\":{\"imb_avg\":0.7,\"imbalance\":0.7},\"imb_avg\":0.7,\"imbalance\":0.7},\"imb_avg\":0.7,\"imbalance\":0.7},\"factor\":1,\"import\":850315,\"export\":6094494,\"power_w\":234,\"current_l1\":424,\"current_l2\":1037,\"current_l3\":322,\"voltage_l1\":233,\"voltage_l2\":236,\"voltage_l3\":234,\"role\":3,\"model\":\"SolarEdge ,SE10K-RWS48BEN4,0004.0022.0039,1.0,7E1FA837,M203\"}","payloadType":"json","x":340,"y":1020,"wires":[["0bb4e51c1cf0f412"]]},{"id":"0bb4e51c1cf0f412","type":"change","z":"667cec54c048503c","name":"","rules":[{"t":"set","p":"pre","pt":"msg","to":"grid_","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":1020,"wires":[["e2da7daa5772614c"]]},{"id":"e2da7daa5772614c","type":"link call","z":"667cec54c048503c","name":"","links":["1854c596b468501c"],"linkType":"static","timeout":"30","x":750,"y":1020,"wires":[["e7f18b2b9ac1eab9"]]},{"id":"e7f18b2b9ac1eab9","type":"debug","z":"667cec54c048503c","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":910,"y":1020,"wires":[]}]