JS实现拼接JSON串
var params = [];
for(var i = 0; i < 3; i++){
var param = [];
param.push("one");
param.push("two");
param.push("three");
params.push({"group":i,"param":param});
}
组成的json串:
[{"group":0,"param":["one","two","three"]},{"group":1,"param":["one","two","three"]},{"group":2,"param":["one","two","three"]}]
本文原创,转载必追究版权。