假如你的数据是arr =[[1,2],[3,4]]; obj = arr.map(function(n, i) { let o ={}; o["radio"+i]=n[0];o["data"]=n;return o;})
https://segmentfault.com/img/...https://segmentfault.com/img/...我请求回来的是["123","123"],返回的结果是上面的,然而我想要下面的结果
假如你的数据是arr =[[1,2],[3,4]]; obj = arr.map(function(n, i) { let o ={}; o["radio"+i]=n[0];o["data"]=n;return o;})