I have the following:
value = 42 array = [\"this\",\"is\",\"a\",\"test\"]
how can I convert that to get this
{ \"this\" =
Try this:
h = array.reverse.inject(value) { |a, n| { n => a } }