I have complex hash which looks like this
@hash = {1=>[], 2=>[], 3=>[], 4=>[], 5=>[], 6=>[], 7=>[], 8=>[], 9=>[], 10=>[], 11=>[], 12=>[[{"value"=>1.58, "title"=>"sun", "quantity" => 2}], [{"value"=>1.99, "title"=>"sophia", "quantity" => 5}], [{"value"=>6.30, "title"=>"roam", "quantity" => 15}], [{"value"=>3.981, "title"=>"jia, "quantity" => 4"}], 13 => [], 14 => [], 15 => []}
now I want to extract highest value along with associated title and quantity. index would 15 all the time.
for example the output should be
@hash = { value => 6.30, title => "roam", quantity => 15 }
I was searhcing some found this but did not make it work reference link Ref
help appreciated thanks