Join-Object icon indicating copy to clipboard operation
Join-Object copied to clipboard

Accept a list of (object) lists

Open iRon7 opened this issue 2 years ago • 1 comments

See: https://github.com/PowerShell/PowerShell/issues/20126

For objects like: $a = '[[1, 2], [3, 4],[5,6]]' | ConvertFrom-Json Instead of:

$a = '[[1, 2], [3, 4],[5,6]]' | ConvertFrom-Json
$a[0] | Join $a[1] | Join $a[2] | ForEach-Object { $_ -Join ' : ' }

I would like to iterate through all embedded lists, wishful thinking:

$a = '[[1, 2], [3, 4],[5,6]]' | ConvertFrom-Json
$a | Join -EachList | ForEach-Object { $_ -Join ' : ' }

iRon7 avatar Oct 23 '23 09:10 iRon7

Complex due to several Pipeline dependencies and exceptions

iRon7 avatar Jul 23 '25 10:07 iRon7