Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# This will format JSON files into CSV
$list = @()
foreach($file in Get-ChildItem -Filter proposal-*.json .) {
$list += ((Get-Content -Encoding UTF8 $file) -join "`n" | ConvertFrom-Json);
$list | select Key_Representation, Id, Title, CreatedAt, ID_CurrentProposalStep, IsAbuse | ConvertTo-Csv > file.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment