I have the following code below.
Group.all.collect {|group| [ group.name, group.id ]}.inspect
And this one outputs below.
[["Bankruptcy Group", 1], ["PIA Group", 2], ["Liquidation Group", 3]]
I want to convert to a different format like below.
{"Bankruptcy Group" => 1, "PIA Group"=> 2, "Liquidation Group"=> 3}
How do I do this?