I am a new developer ,
i have a problem about load json result in javascript
i have a javascript function to fetch data from API
and it was successfull
the result is like this
{
"metadata": {
"code": 200,
"message": "OK"
},
"response": {
"data": {
"Data": [
{
"Itemid": "11332",
"Userid": "3367",
"Username": "00202020",
"Firstname": "Ricki",
"Courseid": "10016",
"Shortname": "Kompetensi Inti",
"Itemname": "Introduction To Programming",
"Finalgrade": "8.00000"
}
]
}
}
}
how can i load it into table or list view in javascript
What I have tried:
var ListValue = "";
var i;
for (i = 0; i < response.length; ++i) {
ListValue += "<li>" + response[i].Itemid + " --- " + response[i].Courseid
}
This is what i tried ,but response.length is undefined ,
how can i solve this?