Bootstrap Table Example
http://bootstrap-table.wenzhixin.net.cn
HTML
<link rel="stylesheet" href="https://rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.css">
<script src="//issues.wenzhixin.net.cn/bootstrap-table/assets/bootstrap-table/src/extensions/export/bootstrap-table-export.js"></script>
<script src="//rawgit.com/kayalshri/tableExport.jquery.plugin/master/tableExport.js"></script>
<script src="//rawgit.com/kayalshri/tableExport.jquery.plugin/master/jquery.base64.js"></script>
<link href="https://unpkg.com/[email protected]/dist/bootstrap-table.min.css" rel="stylesheet">
<script src="https://unpkg.com/[email protected]/dist/bootstrap-table.min.js"></script>
<table id="table">
<thead>
<tr>
<th data-field="betrag">betrag</th>
<th data-field="autorisiert-durch">autorisiert-durch</th>
<th data-field="unix">unix</th>
</tr>
</thead>
</table>
JavaScript
var $table = $('#table')
$(function() {
// do an ajax call here to get the response. your response should be like responseData
var responseData = {
"1604400036082-3450": {
"betrag": -367.5,
"von/an_uuid": "asdqwe2413",
"von/an": "Test1",
"autorisiert-durch": "SYSTEM",
"unix": 1604400036,
"transaktionsart": "Überweisung"
},
"1604406781759-8437": {
"betrag": 85.17,
"von/an": "Test2",
"autorisiert-durch": "SYSTEM",
"unix": 1604406782,
"transaktionsart": "Überweisung"
},
};
var data = [];
// Here you have to flat the array
Object.keys(responseData).forEach(function(key){
var value = responseData[key];
data.push(value);
})
$table.bootstrapTable({data: data})
})