function renderCells(cells, data) {
  for (var i = 0; i < cells.length; i++) {
    var cell = cells[i];
    var key = cell.innerText;
    if (data[key]) {
      cell.innerText = data[key];
      cell.parentElement.className = "rendered";
    } else {
      cell.parentElement.parentElement.removeChild(cell.parentElement);
    }
  }
}
Quick template rendering function.  For each cell passed to it, check
to see if the cell's text content is a key in the supplied data array.
If yes, replace the cell's contents with the corresponding value and
unhide the cell.  If no, then remove the cell's parent (tr) from the
DOM.