title: Dynamically Building HTML Table with Javascript Object
body: <p>Here I'm looping through an object and retrieving the key:value pairs and placing them in a table</p>
  
  <pre><code>obj = clickedRecord.toJSON(); //gets record from 
                                //separate table and converts to JSON format
  var array=[];
  for(key in obj) {
     if(obj.hasOwnProperty(key)) {
        array.push(
           '&lt;table id="myTable"&gt;' +
               '&lt;tr&gt;' +
                 '&lt;td&gt;' + key + '&lt;/td&gt;' +
                 '&lt;td&gt;' + obj[key] + '&lt;/td&gt;' +
               '&lt;tr&gt;' +
           '&lt;/table&gt;''
        );
     }
  }
  </code></pre>
  
  <p>The output of which is:</p>
  
  <pre><code>ID 100
  ,
  Name Billy
  ,
  Address 525 Park Lane
  ,
  </code></pre>
  
  <p>Is there a cleaner way to dynamically construct a table using a javascript Object, as well as omit the commas from the returned data?</p>