ask the bosses, I for in traversal to modify the json array will report a undefined error, can you help me to see what the problem is?
var res = await mysql("cMyStarInfo").where("open_id", id).orderBy("Djlsh", "desc");
for(i in res){
//var newRes = res[i];
var a = res[i].PenName;
var b = await mysql("cPenInfo").where("penName", a);
var c = await mysql("cCoures_list").where("penName", a).orderBy("Djlsh", "desc");;
res[i].rank = b[0].rank
res[i].PenImgUrl = b[0].roundImgUrl
res[i].StarSum = b[0].starSum
res[i].upCourTitl = c[0].couTitle
}
ctx.state.data = res
for