function properties(){ var myObj = { "name": "John", "age": 30, "car": null }; for (x in myObj) { document.getElementById("demo").innerHTML += "property:" + x + " value:" + myObj[x] + "
"; // properties: x values: myObj[x] } }
How to loop through all properties in a JSON object.
Employee ID | Employee Status | Date of birth | Employee Name | Age |
---|---|---|---|---|