title: JSON returning as [object Object] in console log
body: <p>I'm a little green as you can tell by my post history here, but i am trying to get the key, value for a JSON object and its not outputting as i thought it would. What am I doing wrong?</p>
  
  <pre><code>(function($){
      jQuery(document).ready(function(){
          var tableRows = [];
          var headersText = [];
          var $headers = $("th");
          var $rows = $("#table tbody tr").each(function(index) {
            $cells = $(this).find("td");
            tableRows[index] = {};
            $cells.each(function(cellIndex) {
              if(headersText[cellIndex] === undefined) {
                headersText[cellIndex] = $($headers[cellIndex]).text();
              }
              tableRows[index][headersText[cellIndex]] = $(this).text();
            });    
          });
          var tableData = {
              "tableData": tableRows
          };
          /*alert(JSON.stringify(tableData));*/
  
          $.each([tableData], function(key, value){
              console.log( key + ":" + value );
          });
      });
  })(jQuery);
  </code></pre>
  
  <p>in console I'm getting:</p>
  
  <pre><code>0:[object Object]
  </code></pre>
  
  <p>instead of (example):</p>
  
  <pre><code>0:[NAME SAMPLE-NAME]
  </code></pre>