2

in JavaScript for loop result show in html div element

```<div id="empid"></div>```
var emp =[{"firstname":"srikanth", "lastname":"gubbal", "age":"36", "place":"pune", "qualification":"mtech"},{"firstname":"praveen", "lastname":"konda", "age":"42", "place":"hyderabad","qualification":"btech"},
{"firstname":"santosh", "lastname":"vemula", "age":"30", "place":"mumbai", "qualification":"mtech"}, {"firstname":"venkat", "lastname":"katkam", "age":"33", "place":"nagpur", "qualification":"mtech"}
    ]    
for(let i=0; i<emp.length; i++){console.log(emp[i]);
  for(r in emp[i]){console.log(emp[i][r]);} 
}
</script>```

console.log(emp[i][r]); -- this result show in html div element
Raj
  • 59
  • 1
  • 1
  • 6
  • Possible duplicate of [Generate html from array in a better way](https://stackoverflow.com/questions/11730274/generate-html-from-array-in-a-better-way) – Anton Temchenko Oct 17 '19 at 16:05

0 Answers0