Create and fill hash of arrays in Powershell

You can initialize and fill multidimension hashes (arrays) in powershell this way:

$orderIds  = New-Object System.Collections.ArrayList

$orderIds = @{

    ids = @(1,2,3,4,5);

    deps = @(‘one’, ‘two’, ‘three’, ‘four’, ‘five’)

};

Leave a Reply

Your email address will not be published. Required fields are marked *