RosettaCodeData/Task/Sort-an-array-of-composite-structures/PowerShell/sort-an-array-of-composite-structures.psh
2023-07-01 13:44:08 -04:00

9 lines
169 B
Text

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