Consider the below hash
[
{:rank => 3, :time => "3.00 AM" , :name => "JJJ"},
{:rank => 1, :time => "3.05 AM" , :name => "AAA"},
{:rank => 5, :time => "2.55 AM" , :name => "XXX"},
{:rank => 2, :time => "3.10 AM" , :name => "BBB"}
]
How do i sort the fields in an order, so that i will obtain result
as like query
(Consider if we fetch values in has is from a table)
select * from my_table order by rank, time, name
Please comment if i am not clear.
Thanks