Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $JSON = @"
- [{
- "Subtitle": {
- "Search": {
- "Burn": false,
- "Default": false,
- "Enable": false,
- "Forced": false
- },
- "SubtitleList": [{
- "Burn": false,
- "Default": false,
- "Forced": false,
- "ID": 1,
- "Offset": 0,
- "Track": 0
- }]
- }
- }]
- "@
- $JSON = ($JSON | ConvertFrom-Json);
- $JSON | % {
- If(($_.Subtitle.SubtitleList[0].ID -eq 1) -and ($_.Subtitle.SubtitleList[0].Track -eq 0))
- {
- If (!($_.Subtitle.SubtitleList[0].Default = "true"))
- {
- $_.Subtitle.SubtitleList[0].Default = "true";
- }
- }
- };
- $x = $JSON | ConvertTo-Json -depth 32;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement