I need to display the result of the JSON response in a table. I already figure it out using this below
<tr *ngFor="let result of results$ | async">
<td>{{result.max_temp}}</td>
</tr>
But i wanna do something like this below and its not working. Can anyone help me out on how to fix this?
<tr *ngFor="let result of (results$ | async)?.max_temp">
<td>{{result}}</td>
</tr>
I have these two solution which I can suggest. You can use any of them.
Solution 1:
Solution 2:
Please note, from the Angular docs: