Skip to content

Instantly share code, notes, and snippets.

@karanrajs
Last active December 6, 2015 04:59
Show Gist options
  • Save karanrajs/fe546154af98d06885a8 to your computer and use it in GitHub Desktop.
Save karanrajs/fe546154af98d06885a8 to your computer and use it in GitHub Desktop.
component.set("v.latestRecords",response.getReturnValue());
var retRecords = response.getReturnValue();
retRecords.forEach(function(s) {
var tableRow = document.createElement('tr');
fields.forEach(function(field){
var tableData = document.createElement('td');
var tableDataNode = document.createTextNode(s[field]);
tableData.appendChild(tableDataNode);
tableRow.appendChild(tableData);
});
document.getElementById("data").appendChild(tableRow);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment