So I have my data stored in database and I'm extracting in angular and I'm getting the data the problem is when I'm trying to display the data I'm getting the following error. I just need to display the question in html using ngFor* .I'm completely new to angular any guidance will be very helpful .
this.selfHelpService.getFgSelfHelpByName("BYOD").subscribe(data => {
// console.log(data);
const BYOD = JSON.parse(data["data"]);
// console.log(BYOD );
});
<div class="cards" *ngFor="let BYOD of BYOD">
<div class="read-1">
{{BYOD.posts.question}}
</div>
</div>



JSON.parseand it is unclear where, if any of the code shown, is the source for the first image's data. On top of that, it looks like you are not looking at the data correctly as far as what part of the data has how many items (i.e.posts.questionwould not work aspostsseems to be an array)BYODis a local variable to that function passed intosubscribeand is not accessible elsewhere. Also, if thatBYODdata is an array with one element, you need to start with using that element and then iterating over thepostsarray.