Skip to content

Commit

Permalink
Create Add_data_to_JSON.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
endoleg authored Nov 6, 2024
1 parent 24267ff commit fce1a59
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions JSON/Add_data_to_JSON.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
$JSON = @"
[
{
"aa": "1",
"bb": "2",
"cc": "3"
}
]
"@ | ConvertFrom-JSON

$AddToJSON = @"
[
{
"a": "1",
"b": "2",
"cc": "3"
}
]
"@ | ConvertFrom-JSON

$JSON = $JSON += $AddToJSON
$JSON | ConvertTo-Json -Depth 32 | Set-Content -Path D:\file.json -Force -Encoding UTF8

0 comments on commit fce1a59

Please sign in to comment.