Harry Kakueki wrote: > On 5/3/07, Pea, Botp <botp / delmonte-phil.com> wrote: >> >> >> > > Thanks for sort_by. > I didn't know that. > > Harry Just using sort won't get the results into nested arrays based on the groupings. For this, you need group_by: anArray.group_by { |a| a[1..2] }.sort.transpose[1] -- Posted via http://www.ruby-forum.com/.