i have a array of hashes like this and i want to take the maximum value of that
data = [{name: "abc", value: "10.0"}, {name: "def", value: "15.0"}, {name: "ghi", value: "20.0"}, {name: "jkl", value: "50.0"}, {name: "mno", value: "30.0"}]
i want to select the maximum value of array of hashes, output i want is like data: "50.0"
how possible i do that, i've try this but it is seem doesnt work and just give me an error
data.select {|x| x.max['value'] }
any help will be very appreciated