企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` var kd=[ { time:'9-12', date:9, yunn:[14] }, { time:'9-12', date:9, yunn:[] }, { time:'9-12', date:9, yunn:[15,18] }, { time:'9-12', date:9, yunn:[11,22,23] }, ]; var n=0; for(var k=0;k<kd.length;k++){ n=n>kd[k].yunn.length?n:kd[k].yunn.length; } var end=[]; for(var k=0;k<n;k++){ let end_ls=[]; for(var i=0;i<kd.length;i++){ end_ls.push(kd[i].yunn[k]==undefined?"":kd[i].yunn[k]); } end.push(end_ls); } console.log(end); console.log(JSON.stringify(end)); var end_=[ [14,"",15,11], ["","",18,22], ["","","",23] ]; ```