1👍
✅
fetch()
returns a Promise which resolves to a Response.
json()
is a method that is found on the Response, not on the Promise.
You need to await
the resolved value of fetch()
and then call json()
on that value.
Source:stackexchange.com