I have multiple arrays like this:
$arrayList1 = @()
$arrayList2 = @()
$arrayList1 += "james"
$arrayList1 += "henry"
$arrayList1 += "bob"
$arrayList2 += "scott"
$arrayList2 += "john"
$arrayList2 += "meera"
$arrayList2 += "lisa"
$arrayList2 += "joseph"
And i want to display the output like this:
arrayList1 | arrayList2 |
---|---|
james | scott |
henry | john |
bob | meera |
lisa | |
joseph |
Here is what i tried:
$output = @{}
$output.add('arrayList1',$arrayList)
$output.add('arrayList2',$arrayLis2)
[PSCustomObject]$output
$output
And the output looks like this:
arrayList2 | arrayList1 |
---|---|
{scott,john,meera,lisa,joseph} | {james,henry,bob} |
Note: The array won't have same number of data.
Any suggestions how i can get it in the order i want it?
Thanks
Sanjeev