{
"1":"文去",
"2":"147",
}
需要改成
[
{
"name": "1",
"value": "文去"
},
{
"name": "2",
"value": "147"
}
]
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
思路:取出字典中的key,value组成新的res_dic,将res_dic作为res_list中的项append进list中。