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)
# Inspect Result graphically: PS1> $list | Out-GridView
# Inspect Possible Columns: PS1> $list | Get-Member
# See full Object: PS1> $list | fc -Depth 3
$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