i have array of hash like this :
a = [{:transaction_type=>"nationalvoice", :transaction_duration=>181}, {:transaction_type=>"nationalvoice", :transaction_duration=>60}, {:transaction_type=>"call", :transaction_duration=>200}]
how to merge value based transaction_type = "nationalvoice" ?
i want get result like this :
a = [{:transaction_type=>"nationalvoice", :transaction_duration=>241}, {:transaction_type=>"call", :transaction_duration=>200}]
how do that?
thanks before