Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

looping through json array

const res = JSON.parse(xhr.responseText);

for (const key in res){
  if(obj.hasOwnProperty(key)){
    console.log(`${key} : ${res[key]}`)
  }
}
Source by www.sitepoint.com #
 
PREVIOUS NEXT
Tagged: #looping #json #array
ADD COMMENT
Topic
Name
4+7 =