Array of hashes to hash

后端 未结 7 607
遥遥无期
遥遥无期 2020-12-12 15:20

For example, I have array of single hashes

a = [{a: :b}, {c: :d}]

What is best way to convert it into this?

{a: :b, c: :d}
         


        
7条回答
提交回复
热议问题