function parseAllCatResponse(AllCatRequest) { var allCatData = eval('('+AllCatRequest.responseText+')'); var allCatTxt="", i = 0; allCatTxt += "

Categories

"; allCatTxt += "
"; for (i in allCatData) { allCatTxt += "
"; allCatTxt += "

" + allCatData[i].name +"

"; allCatTxt += "

Category ID: " + allCatData[i].id + "

"; allCatTxt += "

Description: " + allCatData[i].description + "

"; allCatTxt += "

Slug: " + allCatData[i].slug + "

"; allCatTxt += "

Link to Posts: "+allCatData[i]._links['self'][0].href+"

"; allCatTxt += "

Post Count: " + allCatData[i].count + "

"; allCatTxt += "

Parent Category: " + allCatData[i].parent + "

"; allCatTxt += "
"; } document.querySelector(".content").innerHTML = allCatTxt; }