阅读背景:

将哈希的数组转换为哈希的哈希,由哈希的属性索引

来源:互联网 

I've got an array of hashes representing objects as a response to an API call. I need to pull data from some of the hashes, and one particular key serves as an id for the hash object. I would like to convert the array into a hash with the keys as the ids, and the values as the original hash with that id.I've got an array of hashes representing object




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: