I have a JSON array of objects, which I want to dispaly all of it into a table, but somewhere I'm messing up with something.
Problem Statement: Display JSON array of nested objects in a table including all of its contents.
JSON Data:
{
"loadStops": [{
"id": 1,
"sequence": 1,
"type": "P",
"stop": {
"companyId": 148,
"companyCode": "FWS",
"legalName": "Frontier WHSE",
"locations": [{
"id": 149,
"city": "PortLavaca",
"state": "TX",
"contacts": [{
"id": 150,
"medium": "MA",
"serviceLocator": "000-000-0000",
"prefered": false,
"action": 0
}],
"action": 0
}],
"action": 0
},
"apptType": "WDO",
"appointmentNo": null,
"commodities": [{
"id": 0,
"commodity": "Food",
"action": 0
}],
"action": 0
}, {
"id": 1,
"sequence": 1,
"type": "P",
"stop": {
"companyId": 148,
"companyCode": "FWS",
"legalName": "Frontier WHSE",
"locations": [{
"id": 149,
"city": "PortLavaca",
"state": "TX",
"contacts": [{
"id": 150,
"medium": "MA",
"serviceLocator": "000-000-0000",
"prefered": false,
"action": 0
}],
"action": 0
}],
"action": 0
},
"apptType": "WDO",
"appointmentNo": null,
"commodities": [{
"id": 0,
"commodity": "Food",
"action": 0
}],
"action": 0
}]
}
Please guide me how do I write the code for bootstrap table to achieve all the contents inside the table.
TABLE:
<table class="table table-striped table-hover table-sm">
<tr>
<th>headers</th>
</tr>
<tr>
<td> data </td>
<td>
<table>
<tr>
<td> nested data etc.. </td>
</tr>
</table>
</td>
</tr>
</table>
Please enlighten my misunderstanding, I'll be thankful to you. Thanks
ng-repeat?