title: How to fix: Cannot create property 'header' on string
body: <p>I'm trying to create a pdf using jspdf from json data. But it is causing an error which i'm not able to understand. Please help me solve the issue.</p>
  
  <p>Data:</p>
  
  <pre><code>fileDataSpecific = [{ Date: "01/Jan/2019",
      ServerName: "prlhpcms01",
      ServerRequest: "Front End License returned",
      ServerStatus: "57 timed out",
      Time: "01:03:32",
      UserName: "root",
      srno: 1 }]
  
  displayColumns = [
      { "val": "srno", "col": "Sr. No." },
      { "val": "ServerName", "col": "Server Name" },
      { "val": "UserName", "col": "User Name" },
      { "val": "Date", "col": "Date" },
      { "val": "Time", "col": "Time" },
      { "val": "ServerRequest", "col": "Server Request" },
      { "val": "ServerStatus", "col": "Server Status" }];
  </code></pre>
  
  <p>My function:</p>
  
  <pre><code>PrintData() {
      var pdfData = this.fileDataSpecific
      var pdfCol = this.displayedColumns
      var doc = new jsPDF()
      var col = [], row = []
      pdfCol.forEach(element =&gt; {
        col.push(element.col)
      });    
      pdfData.forEach(element =&gt; {
        var tempArray = []
        pdfCol.forEach(element1 =&gt; {
          tempArray.push(element[element1.val])
        });
        row.push(tempArray)
        tempArray = []
      });
      doc.autoTable(col, row);
      doc.save('Test.pdf');
    }
  </code></pre>
  
  <p>Error:</p>
  
  <p><a href="https://i.stack.imgur.com/FoUBh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FoUBh.png" alt="enter image description here"></a></p>
  
  <p>Please someone help! Thanks.</p>