I'm having variable with some properties:
var fullName = { FirstName:'Josef',SecondName:'Luis', LastName:'Pumpkin'}
and I'm getting value of this variable and put it into Table like this:
for(var i in fullName){
if(fullName.hasOwnProperty(i)){
var newCell = newRow.insertCell(0);
newCell.innerHTML = fullName[i];
}
}
The output result is: Josef Luis Pumpkin. The question is how can I add their property name too, to get output like: FirstName - Josef, SecondName - Luis, LastName - Pumpkin (in their cells respectively)?