M365DSC exports data as a .ps1 script. That does not scale and does not allow converting the data to JSON or YAML.
There is a promising MOF Parser but this parser cannot handle complex data types. An issue is open: mikeclayton/Kingsland.MofParser#83.
The most promising way is to rewrite the M365DSC export routing to get data and not PowerShell code.
M365DSC exports data as a .ps1 script. That does not scale and does not allow converting the data to JSON or YAML.
There is a promising MOF Parser but this parser cannot handle complex data types. An issue is open: mikeclayton/Kingsland.MofParser#83.
The most promising way is to rewrite the M365DSC export routing to get data and not PowerShell code.