Created
December 8, 2025 16:21
-
-
Save dcouto/9fdc01a48726293a118757e52838b551 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Input / Output | |
| $inputPath = ".\h=20\m=00\PT1H.json" | |
| $outputPath = ".\h=20\m=00\PT1H-resultDescription.txt" | |
| Get-Content -LiteralPath $inputPath | | |
| ForEach-Object { | |
| try { | |
| ($_.Trim() | ConvertFrom-Json).resultDescription | |
| } | |
| catch { | |
| $null # skip malformed lines | |
| } | |
| } | | |
| Where-Object { $_ -ne $null } | | |
| ForEach-Object { $_.TrimEnd() } | | |
| Set-Content -LiteralPath $outputPath -Encoding UTF8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment