4
我想知道是否有更簡單的方法在PowerShell中創建多維哈希表數組。我已經能夠用這樣的幾行成功創建它們。在Powershell中創建一個多維哈希表數組
$arr = @{}
$arr["David"] = @{}
$arr["David"]["TSHIRTS"] = @{}
$arr["David"]["TSHIRTS"]["SIZE"] = "M"
不過我在想,如果有任何的方式來縮短這是這樣的......
$new_arr["Level1"]["Level2"]["Level3"] = "Test"
哪裏如果這樣做,將創建一個新的水平尚不存在。謝謝!
你之後[autovivification](https://en.wikipedia.org/wiki/Autovivification)和否,PowerShell沒有它。 –