I'm building a table from a JSON object. First step is to build the table column headers:
jq_tblRow = $('<tr>') ;
obj_Report.fieldMetadata.forEach( function(elt) {
   jq_tblRow.append('<th>' + elt.name)
}) ;
That yields a row with the column headers:
<tr><th>Item Type</th><th>Title</th> ... etc... </tr>
Is there an easier way to wrap that with TABLE & THEAD tags? Here's what I came up with eventually. It works but 2 calls to ".append()" seems awkward.
jq_tblRow = $('<table>').append( $('<thead>').append(jq_tblRow) );
I tried various combinations of
 .append('<table><thead>')
using append, appendTo, prepend, before, after, etc and the permutations thereof.


jq_tblRowis now actually the whole table not the row you appended...not sure what that assignment is intended for