[
{ "id": "1", "file_name": "fdsa", "size": "111",
"modified_time": "2017-01-09 17:36:45.0", "password": "qqq"
},
{ "id": "2", "file_name": "jkl", "size": "22",
"modified_time": "2017-01-09 17:36:45.0", "password": "www"
}
]上面这段json如何优雅地将它转换为关联数组,并且该数组的键key为他的id。我目前只知道用for循环依次遍历老数组,然后丢到一个新数组中,请问还有其他什么优雅的写法吗?
添加回答
举报
0/150
提交
取消