0
I am receiving in json a category list that has the id data and name.
I make restful in pure javascript and can already view the data in the browser console, I am using this code:
if (xhr.status == 200) {
window.sessionStorage.setItem('lista', xhr.responseText);
var lista = window.sessionStorage.getItem('lista');
lista = JSON.parse(lista);
let x = document.querySelector('#body')
JSON.map(item => {
x.innerHTML += '<tr><td>'+ item.title +'</td></tr>'
});
}
My problem is that I don’t know how to insert the data I receive into table to display it to users. Can someone at least say the logic or show me an example of code if possible?
is using Pure JS?
– Rafael Augusto
I am @Rafaelaugusto
– Francis Vagner da Luz