I used jspdf to create a pdf file.I want to display json data in jspdf by using table. I used 'doc.autoTable' to display data in the form of table.How can i show the json data in a table.

**html code**

```
<button ion-button (click)="exportpdf()">Download</button>

```

**ts code**

```
exportpdf(){
    var item=this.display;
    console.log(item);
    var columns = ["Employee Name", "PRESENT","ABSENT","OFFDAY","LEAVE","LATE"];
    var rows = [];

    for(var key in item){
         var temp = [key, item[key]];
         rows.push(temp);
         console.log(temp,"temp");
       }

    var doc = new jsPDF('p', 'pt');
    doc.autoTable(columns, rows);
    doc.setFontStyle('Bold');
    doc.setFontSize(14);

    doc.save('Test.pdf');
  }

```

[![enter image description here](https://i.stack.imgur.com/QPh4h.png)](https://i.stack.imgur.com/QPh4h.png)