1 var temporders = []; 2 for (var j = 0; j < 10; j++) { 3 var order = {}; 4 order.id = j; 5 order.dianping = []; 6 var dianping = {}; 7 8 for (var i = 0; i < 10; i++) { 9 dianping.id = i; 10 dianping.name = "端木"; 11 dianping.text = "端木是个好人"; 12 order.dianping.push(dianping); 13 } 14 temporders.push(order); 15 }