Skip to content

Instantly share code, notes, and snippets.

@levi-turner
Created March 13, 2019 01:26
Show Gist options
  • Save levi-turner/5ce59c163ceb774a4bd47609bc680ac5 to your computer and use it in GitHub Desktop.
Save levi-turner/5ce59c163ceb774a4bd47609bc680ac5 to your computer and use it in GitHub Desktop.
Get-ChildItem -Recurse -Filter *.json |
ForEach-Object {
Write-Host $_.Name
Write-Host $_.FullName
$jsondata = Get-Content -Raw -Path $_.FullName | ConvertFrom-Json
$jsondata.scenario | Where{$_.Label -eq 'SELECT in Benchmark'} | ForEach{$_.Type = 'SelectString'}
$jsondata.scenario | Where{$_.Label -eq 'SELECT in Benchmark'} | ForEach{$_.StringSelection = 'Under 65 Population'}
$jsondata | ConvertTo-Json -depth 100 | Out-File -LiteralPath $_.FullName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment