I,m new in working with bootstrap and json files and I came to the following problem:
I've got the following code:
<div class="container">
<h1 class="text text-success text-center ">Kontoauszug</h1>
<table id="table" data-toggle="table" data-url="/json/data.json">
<thead>
<tr>
<th data-field="auszug.betrag">ID</th>
<th data-field="auszug.unix">Item Name</th>
<th data-field="auszug.transaktionsart">Item Price</th>
</tr>
</thead>
</table>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.16.0/dist/bootstrap-table.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<link rel="stylesheet" href = "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href= "https://unpkg.com/bootstrap-table@1.16.0/dist/bootstrap-table.min.css">
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.0/dist/bootstrap-table.min.css">
And the json I'm working with has the following structure:
{
"auszug": {
"1604400036082-3450": {
"betrag": -367.5,
"von/an_uuid": "Test1",
"von/an": "Test1",
"autorisiert-durch": "SYSTEM",
"unix": 1604400036,
"transaktionsart": "Lohnzahlung"
},
"1604406781759-8437": {
"betrag": 85.17,
"von/an": "Test2",
"autorisiert-durch": "SYSTEM",
"unix": 1604406782,
"transaktionsart": "Überweisung"
},
"1604395596115-5983": {
"betrag": 1226.48,
"von/an": "Test3",
"autorisiert-durch": "SYSTEM",
"unix": 1604395596,
"transaktionsart": "Überweisung"
}
},
"kontonummer": "DEF05487151498683",
"kontostand": 44641548.66,
"success": true
}
But when I try to run the code I get "No matching records found". How do I get the data from a json like this into the table?
Many thanks in advance!
Edit:
I don't know how to exactly get the responseText in here but here's a screenshot of the console.log: