var str = '';
var json = new Object;
var arr =new Array();
for(var i =0; i<4;i++){
var jsons = new Object;
var shopId= i+'00';
jsons.logisticsType = i+'0';
jsons.logisticsCost = i+'0';
jsons.buyerFeedback = i+'0';
//json += '"l'+shopId+'":{"logisticsType":'+logisticsType+',"logisticsCost":'+logisticsCost+',"buyFeedback":"'+buyerFeedback+'"},';
json[shopId] = jsons;
str = JSON.stringify([json]);
// arr.push(str);
//return str;
}
console.log(str) ;
![](https://img2024.cnblogs.com/blog/35695/202408/35695-20240826070647288-243310440.jpg)