Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanmedd/d67181d906af2da8874c06658c961f7f to your computer and use it in GitHub Desktop.
Save jonathanmedd/d67181d906af2da8874c06658c961f7f to your computer and use it in GitHub Desktop.
Combine JSON files using Array subexpression operator
$data1 = Get-Content .\fruit1.json -Raw | ConvertFrom-Json
$data2 = Get-Content .\fruit2.json -Raw | ConvertFrom-Json
@($data1; $data2) | ConvertTo-Json | Out-File .\combinedfruit.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment