調接口時遇到三維數組該怎麽處理
var proholeid = [];
var arrtt = {};
arrtt[‘name‘] = namecc ;
arrtt[‘num‘] = numc ;
arrtt[‘gname‘] = gname;
arrtt[‘gscale‘] = gscale;
arrtt[‘holdshare‘] = holdsharec;
arrtt[‘holdshare_propor‘] = holdshare_proporc;
arrtt[‘gcode‘] = gcode;
arrtt[‘type‘] = 1;
var arrtt1 = {};
arrtt1[‘name‘] = namecc1 ;
arrtt1[‘num‘] = numc1 ;
arrtt1[‘gname‘] = gname1;
arrtt1[‘gscale‘] = gscale1;
arrtt1[‘holdshare‘] = holdsharec1;
arrtt1[‘holdshare_propor‘] = holdshare_proporc1;
arrtt1[‘gcode‘] = gcode1;
arrtt1[‘type‘] = 1;
var arrtt2 = {};
arrtt2[‘name‘] = namecc2 ;
arrtt2[‘num‘] = numc2 ;
arrtt2[‘gname‘] = gname2;
arrtt2[‘gscale‘] = gscale2;
arrtt2[‘holdshare‘] = holdsharec2;
arrtt2[‘holdshare_propor‘] = holdshare_proporc2;
arrtt2[‘gcode‘] = gcode2;
arrtt2[‘type‘] = 1;
proholeid.push(arrtt);
proholeid.push(arrtt1);
proholeid.push(arrtt2);
data[‘proholeid‘]=proholeid;
data = JSON.stringify(data);
$.ajax({
type:"POST",
dataType:"json",
data: {contents:data},
url:"/cifcogroup/application/web/index.php?r=future-org/trade-code&userId="+userId,
調接口時遇到三維數組該怎麽處理