xxxxxxxxxx
# Read the JSON file
$jsonFile = "path/to/file.json"
$jsonContent = Get-Content -Raw -Path $jsonFile | ConvertFrom-Json
# Update the desired JSON value
$jsonContent.property = "new value"
# Save the updated JSON back to the file
$jsonContent | ConvertTo-Json | Set-Content -Path $jsonFile
xxxxxxxxxx
$a = Get-Content 'D:\temp\mytest.json' -raw | ConvertFrom-Json
$a.update | % {if($_.name -eq 'test1'){$_.version=3.0}}
$a | ConvertTo-Json -depth 32| set-content 'D:\temp\mytestBis.json'