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

2015-11-18 06:14:39 +00:00
$list = @{
"def" = "one"
"abc" = "two"
"jkl" = "three"
"abcdef" = "four"
"ghi" = "five"
"ghijkl" = "six"
}
$list.GetEnumerator() | sort {-($PSItem.Name).length}, Name