RosettaCodeData/Task/Sort-an-array-of-composite-structures/PowerShell/sort-an-array-of-composite-structures.ps1
2026-04-30 12:34:36 -04:00

9 lines
169 B
PowerShell

$list = @{
"def" = "one"
"abc" = "two"
"jkl" = "three"
"abcdef" = "four"
"ghi" = "five"
"ghijkl" = "six"
}
$list.GetEnumerator() | sort {-($PSItem.Name).length}, Name