方法如下:
12345678910 function tojson(arr){
if(!arr.length) return null;
var i = 0;
len = arr.length, array = [];
for(;i array.push({"projectname":arr[i][0],"projectnumber":arr[i][1]}); } return JSON.stringify(array); }
方法如下:
12345678910 function tojson(arr){
if(!arr.length) return null;
var i = 0;
len = arr.length, array = [];
for(;i array.push({"projectname":arr[i][0],"projectnumber":arr[i][1]}); } return JSON.stringify(array); }