js中json串嵌如何json串中嵌套json串 for (var i = 0; i < xxx.length; i++) { array['x'] = x[i]; array['x'] = x[i]; array['x'] = x[i]; json.push(array) array = {}; } 这是当前嵌套一层的代码 想实现这种效果: [{"x":"-10","x":"2021070","x":287.28,itemStyle: {color: 'rgb(41,60,85)'}}] 当前是这种效果; [{"x":"-10","x":"2021070","x":287.28}] |