mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-11-07 06:24:48 +00:00
11 lines
292 B
PowerShell
11 lines
292 B
PowerShell
# testing converting json -> pscustomobject > hashtable
|
|
|
|
. "$psscriptroot\..\lib\core.ps1"
|
|
. "$psscriptroot\..\lib\config.ps1"
|
|
|
|
$json = '{ "one": 1, "two": [ { "a": "a" }, "b", 2 ], "three": { "four": 4 } }'
|
|
$global:obj = convertfrom-json $json
|
|
|
|
$a = $obj.two[0]
|
|
|
|
$global:res = hashtable $obj |