Skip to content

Instantly share code, notes, and snippets.

Created September 27, 2013 08:09
Show Gist options
  • Save anonymous/6725531 to your computer and use it in GitHub Desktop.
Save anonymous/6725531 to your computer and use it in GitHub Desktop.
#
# This will format http://openantrag.de/api/proposal/ID/gettop/100 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