1},{"">
>> arr << {:name => 3, :type1 => 'b'} => [{:type1=>"a", :name=>1}, {:type1=>"c", :name=>2}, {:type1=>"b", :name=>3}] >> arr.sort_by{|x| x[:type1]} => [{:type1=>"a", :name=>1}, {:type1=>"b", :name=>3}, {:type1=>"c", :name=>2}] >> arr.sort{|x, y| x[:type1] <=> y[:type1]} => [{:type1=>"a", :name=>1}, {:type1=>"b", :name=>3}, {:type1=>"c", :name=>2}]