Share via

Convert Data into the CSV format

Kalaimani Thirupathi 411 Reputation points
2022-09-19T17:45:54.243+00:00

Dear Team,

Currently, I am receiving the data in the following format, which I need to convert to a CSV file. It would be helpful if you could help me convert

{“accountId”:“111111”,“resourceId”:“qqqqqqq”,“Region”:“us-east-1”}
{“accountId”:“222222”,“resourceId”:“aaaaaaa”,“Region”:“eu-central-1”}
{“accountId”:“333333”,“resourceId”:“zzzzzzz”,“Region”:“East”}

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

Answer accepted by question author

Rich Matheisen 48,116 Reputation points
2022-09-19T18:10:28.637+00:00

That's easily done:

Get-Content c:\junk\json.txt | ConvertFrom-Json | Export-Csv c:\junk\json.csv -NoTypeInformation  

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.