I have received a JSON result that looks like this:
{
"discipline":"ACLS",
"course": [
{
"value":"ACLS Initial",
"classes":"0",
"students":"0"
},
{
"BLS":"CPR Instructor Class",
"classes":"0",
"students":"0"
}
]
}
Now, I need to display this data in a table format similar to the one shown https://i.sstatic.net/SZu4q.jpg. Although I am familiar with displaying data in tables using Angular, the specific structure of this JSON and its required layout is proving to be challenging. In my previous tables, I have presented data like below:
<table class="table table-hover table-striped">
<thead>
<tr>
<th>Date/Time</th>
<th>Course</th>
<th>Location</th>
<th>Instructor</th>
<th>Enrolled</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td class="trim">25/6/2019</td>
<td class="trim">Chemistry</td>
<td class="trim">Islamabad</td>
<td class="trim">Shaharyar</td>
<td class="trim">Yes</td>
<td class="trim">
<nb-select>
<nb-option value="2">Edit</nb-option>
<nb-option value="3">Delete</nb-option>
<nb-option value="4">View</nb-option>
</nb-select>
</td>
</tr>
</tbody>
</table>
If anyone could guide me on how to appropriately present the aforementioned JSON data in my table as depicted in the picture, it would be greatly appreciated. P.S: Please note that the JSON structure mentioned above is hypothetical, and I have not yet developed the API code.