Created
November 27, 2018 21:11
-
-
Save johnayoung/036860f001d6f85c7ae54ce635b1e724 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
#Convert JSON file to an object | |
$JsonParameters = ConvertFrom-Json -InputObject $content | |
#Create new PSObject with no properties | |
$oData = New-Object PSObject | |
#Loop through properties of the $JsonParameters.parameters object, and add them to the new blank object | |
$JsonParameters.parameters.psobject.Properties.Name | | |
ForEach{ | |
Add-Member -InputObject $oData -NotePropertyName $_ -NotePropertyValue $JsonParameters.parameters.$_.Value | |
} | |
$oData |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment