In my code, I am trying to take a JSON element using fromFetch() method and display it as a table in categories such as id, name and amount. I can see the list on the console but I couldn't figure out how to put that list into an array, reach it's contents such as id, name and amount and, display it as a table (i want to use ngFor for that). Here is my code, what should I do to put this list into an array and reach its contents?
TS:
const data$ = fromFetch(
'https://somedata/meals.json'
).pipe(
switchMap((response) => {
return response.json();
})
);
data$.subscribe({
next: (result) => console.log(result),
});