loop into javascript object and show in table

Dami alwed

New Member
I am using javascript json object. I am not sure it is the right way to write json object :-\[code\]var address={ details:{ "martin":[{"full_name":"James Martin"},{"address":"Florida"},{"phone":"897657834"}], "luthar":[{"full_name":"Luther king"},{"address":"Boston"},{"phone":"9856568789"}], "jonson":[{"full_name":"Jonson vierra"},{"address":"New york"},{"phone":"98654567887"}] }}\[/code\]Now, i wanna show every elements of all person in a table. I can do it manually by writing\[code\]<table border=1><tr><td><script>document.write(address.details.martin[0].full_name)</script></td><td><script>document.write(address.details.martin[1].address)</script></td><td><script>document.write(address.details.martin[2].phone)</script></td></tr></table>\[/code\]Like this for all 3 person. But i just wanna grab full details of all person by a loop. How to do this easily by a loop.
 
Top