Hi there!
I am trying to build a weather app using WeatherAPI that return something like that:
{3 items “location”:{8 items “name”:”London” “region”:”City of London, Greater London” “country”:”United Kingdom” “lat”:51.52 “lon”:-0.11 “tz_id”:”Europe/London” “localtime_epoch”:1629354021 “localtime”:”2021-08-19 7:20″ } “current”:{23 items “last_updated_epoch”:1629353700 “last_updated”:”2021-08-19 07:15″ “temp_c”:15 “temp_f”:59 “is_day”:1 “condition”:{…}3 items “wind_mph”:8.1 “wind_kph”:13 “wind_degree”:240 “wind_dir”:”WSW” “pressure_mb”:1014 “pressure_in”:29.94 “precip_mm”:0 “precip_in”:0 “humidity”:77 “cloud”:100 “feelslike_c”:14.6 “feelslike_f”:58.4 “vis_km”:10 “vis_miles”:6 “uv”:1 “gust_mph”:7.8 “gust_kph”:12.6 } “forecast”:{1 item “forecastday”:[…]3 items } }
How can I access the information from this object if .map() doesn’t work on objects?
Thanks a lot for your response in advance!
submitted by /u/weiss-kuru
[link] [comments]