I have a single-element list that appears as shown below
view image of array and contents
My goal is to present the data in a table with headers for Author Name and Title. However, my current code displays all the titles in one row instead of creating separate rows for each Title and Author Name. How can I fix this issue?
See the table created using the code below
<table class='table table-striped' aria-labelledby="tableLabel" *ngIf="authorWithBooks">
<thead>
<tr>
<th>Author Name</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let authorWithBook of authorWithBooks">
<td>{{ authorWithBook.authorName }}</td>
<td>{{ authorWithBook.bookNameList }}</td>
</tr>
</tbody>
</table>