Home > Article > Web Front-end > Use js to declare an array, and the object is in the jsp page (get ajax to get json data)_Basic knowledge
1. You can use the jsp tag
in the js of the jsp pagevar patientInfoList={patientId:"${session.patientId}"};
var docDepList=[],noTypeMap=["","Normal number" ,"Attending physician number","Deputy chief physician number","Chief physician number"];
docDepList [${idx.index}]={doctorId:"${list.doctorId}",departmentName:"${list.departmentName}"} ;
docDepList is an array, which can be an object in js assignment
patientInfoList is an object
2. If the value passed by ajax is
}