我有两个数组第一个是
lineChart = [{type : 'line' , data : arrdata }] ;
第二个是
mina = [{type : 'area' , data : [[1326844575000,10] ,[1326845955000,10]], color : 'H33FF00'},
{type : 'area' , data : [[1326846575000,10] ,[1326848065000,10]], color : 'H33FF00'},
{type : 'area' , data : [[1326848390000,10] ,[1326849755000,10]], color : 'H33FF00'} ];
当我把它们推到一起时:
mychart.push(lineChart);
mychart.push(mina);
console.log(JSON.stringify(mychart)) ;
这就是我得到的
[{"type":"line","data":[]},[{"type":"area","data":[[1326844575000,10],[1326845955000,10]],"color":"H33FF00"},{"type":"area","data":[[1326846575000,10],[1326848065000,10]],"color":"H33FF00"},{"type":"area","data":[[1326848390000,10],[1326849755000,10]],"color":"H33FF00"}]]
我的问题是:如何使这个结果数组像这样一个数组?
[{"type":"line","data":[]},{"type":"area","data":[[1326844575000,10],[1326845955000,10]],"color":"H33FF00"},{"type":"area","data":[[1326846575000,10],[1326848065000,10]],"color":"H33FF00"},{"type":"area","data":[[1326848390000,10],[1326849755000,10]],"color":"H33FF00"}]