RosettaCodeData/Task/Sort-an-array-of-composite-structures/PowerShell/sort-an-array-of-composite-structures.psh

10 lines
169 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
$list = @{
"def" = "one"
"abc" = "two"
"jkl" = "three"
"abcdef" = "four"
"ghi" = "five"
"ghijkl" = "six"
}
$list.GetEnumerator() | sort {-($PSItem.Name).length}, Name