数组-一维数组、多维数组 data:[ { "hour": 0, "jNumber": 0, "zNumber": 1.1 }, { "hour": 1, "jNumber": 1, "zNumber": 1.2 }, { "hour": 3, "jNumber": 2, "zNumber": 1.3 }, { "hour": 4, "jNumber": 3, "zNumber": 1.4 } ] var aa = data.data1 var arrJ = new Array(); var arrZ = new Array(); var arrS = new Array(); $.each(aa, function(k, v) { arrJ.push(v.jNumber); arrZ.push(v.zNumber); arrS.push(v.hour); }); 得到结果:一维数组 arrJ: [0,1,2,3] arrZ: [1.1,1.2,1.3,1.4] arrS: [0,1,3,4] var arr = new Array(); $.each(aa, function(k, v) { var obj = { 'hour': v.platformName, 'jNumber': v.taskMoney, 'zNumber': v.serveMoney, }; arr.push(obj); }); 得到结果:多维数组 arr: [ { "hour": 0, "jNumber": 0, "zNumber": 1.1 }, { "hour": 1, "jNumber": 1, "zNumber": 1.2 }, { "hour": 3, "jNumber": 2, "zNumber": 1.3 }, { "hour": 4, "jNumber": 3, "zNumber": 1.4 } ] 只保留数组某个字段 var newArr = []; for (var i = 0; i < this.datumList.length; i++) { // var obj = { 'id': this.datumList[i].id, 'content': this.datumList[i].content, }; newArr.push(obj); } console.log(newArr, '188')