so I'm trying to populate a table with some data taken from an api, the problem is that the array that I need to get into the table is inside an object, this is what I get from console.log
and this is my JS script
$.get("https://api.covid19api.com/summary", function (data) {
console.log(data)
$(function () {
$('#table').bootstrapTable({
data: data
});
});
});
this is the table
<table id="table" data-height="460" data-search="true" data-side-pagination="server" data-pagination="true">
<thead>
<tr>
<th data-field="Country" data-sortable="true">Country</th>
<th data-field="NewConfirmed" data-sortable="true">NewConfirmed</th>
<th data-field="TotalConfirmed" data-sortable="true">TotalConfirmed</th>
<th data-field="NewDeaths" data-sortable="true">NewDeaths</th>
<th data-field="TotalDeaths" data-sortable="true">TotalDeaths</th>
<th data-field="NewRecovered" data-sortable="true">NewRecovered</th>
<th data-field="TotalRecovered" data-sortable="true">TotalRecovered</th>
</tr>
</thead>
Thanks so much!