I'm having some trouble with a for loop as I attempt to display the details array within my data structure.
for(i in myObj.detail){
x += "<h2>" + myObj.detail[i].bigtitle + "</h2>";
for(z=0; z<3; z++){
x+="<h2>"+ myObj.detail[i].infor[i].step[z] + "</h2>";
for(m=0; m<3; m++){
x+="<h2>"+ myObj.detail[i].infor[i].image[m] + "</h2>";
for(c=0; c<3; c++){
x+="<h2>"+ myObj.detail[i].infor[i].content[c] + "</h2>";
}
}
}
}
myObj={"detail":[{
"bigtitle":"Print Room",
"lable":3,
"infor":[{"step":["First","Second","Third"]},
{"image":["imge-1","imge-2","image-3"]},
{"content":["1111","2222","3333"]}
]}
}
the result should look like this:
Print Room
First
imge-1
1111
Second
imge-2
2222
Third
image-3
3333