Last active
November 24, 2024 11:04
-
-
Save omarrodriguez15/5a1ceae1976b33cbd961e48dd78d5bf4 to your computer and use it in GitHub Desktop.
Remove comments from json so that powershell can convert it into a Object without throwing up.
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
| Get-Content .\settings.json | %{ if ($_.Contains('//')){ $_.SubString(0, $_.IndexOf('//')) } else {$_}} | ConvertFrom-Json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment