Array 我想你可能寫過以下這樣的程式。 ... 其實Ruby 內建的API 就可以支援下述寫法:. array ... hash = Hash[ data.map {|d| [d.foo, d.bar]} ].
確定! 回上一頁