JSFiddle - React, Tailwind, and code Playground
HTML
<table id="table">
<tr>
</tr>
</table>
JavaScript
var object = {
publicationDate: "28-02-2014",
contracted: "Servicash - Equipamentos Electrónicos, Lda.",
contracting: "Banco de Portugal",
id: 994738,
objectBriefDescription: "Consumíveis de papel para tratamento de dinheiro",
initialContractualPrice: "12.945,50 €",
signingDate: "28-02-2014"
};
for (var prop in object) {
// important check that this is objects own property
// not from prototype prop inherited
if(object.hasOwnProperty(prop)){
var td = document.createElement("td");
var strong = document.createElement("strong");
var text = document.createTextNode(prop + " - " + object[prop]);
strong.appendChild(text);
td.appendChild(strong);
document.getElementById("table").appendChild(td);
}
}