I use arrays of arrays in a Powershell script, however, sometimes, my array of arrays, actually contains only one array. For some reason, Powershell keeps replacing that array containing one array, by just one array. I don't get it, no other scripting / coding language I ever used has done that before.
Example, this is what I do not want:
PS C:\Users\> $a = @(@(123,456,789))
PS C:\Users\> $a[0]
123
This is what I want:
PS C:\Users\> $a = @(@(123,456,789), @())
PS C:\Users\> $a[0]
123
456
789
Why do I have to force an extra empty array for Powershell to consider my array of arrays as such when it only contains one array ? This is driving me nuts !