How can I convert the following
@results = [{"id"=>"one", "url"=>"/new/file_one.jpg"},
{"id"=>"two", "url"=>"/new/file_two.jpg"}]
to
@results = {"one" => "/new/file_one.jpg",
"two" => "/new/file_two.jpg"}
Should I use "map" or "collect"? Starting with..
@results.map{ |x| x['id']}
@resultsisn't Ruby at all, what should it really look like?@results = { 'one' => ... }perhaps?