举例:
form表单中有如下几个input
<input type="text" name="brand" value="XX品牌">
<input type="text" name="model" value="XX型号">
<input type="text" name="upload_pic" value="111">
<input type="text" name="upload_pic" value="222">
<input type="text" name="upload_pic" value="333">
期望让name相同的几个upload_pic变成如下样子
{
"brand": "XX品牌",
"model": "XX型号",
"upload_pic": [
"111",
"222",
"333"
]
}
请问应该怎么做?
摇曳的蔷薇
相关分类