Having trouble trying to access nested objects in the OpenWeather REST API. Getting full results in Postman, but not when trying to render.
Postma...
For further actions, you may consider blocking this person and/or reporting abuse
It's most likely something silly. Try
console.log(openWeather, openWeather.weather, openWeather.weather[0])comes back undefined.
You should have 3 outputs. Is that
undefined, undefined, undefined?Can we get the full code?
Unhandled Rejection (TypeError): Cannot read property '0' of undefined. Breaks the page, doesn't even log anything.
Can we see the code please? It could be a number of things.
It is in React and uses hooks.
The console.log in the axiosGet method is breaking the page.