I have a hash containing numbers as such:
{0=>0.07394653730860076, 1=>0.0739598476853163, 2=>0.07398647083461522}
it needs to be converted to an array, for example:
[[0, 0.07394653730860076], [1, 0.0739598476853163], [2, 0.07398647083461522]]
I tried my hash values ββthat got me:
[0.07398921877505593, 0.07400253683443543, 0.07402917535044515]
I tried several ways, but I just started learning ruby.
arrays ruby hash
user2376068
source share