var buildTable = function(tableId, tData) {
var tableRef = document.getElementById(tableId);
tData.forEach(dataObj => {
var row = tableRef.insertRow(1);
Object.values(dataObj).forEach(val => {
var dataColumn = document.createElement("td");
dataColumn.innerHTML = val;
row.appendChild(dataColumn);
});
});
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter