Sorting hash table problem

by Apr 2, 2014

I have a hash table of hash tables

$events = @{}

I add systems $events += @{sys1=@{count1 = 3; count2 = 5}

                                                sys2=@{count1 = 15; count2 = 10}} and so on for 150 systems

I want to sort this so I can find the ten systems that have the highest count1 value, then sort it so I get the ten systems with the highest count2 value.

I am at a loss as to how to do it.

Any help would be appreciated.