Quería almacenar Latitud y Longitud en 2 variables diferentes para que pueda usarse en otra solicitud de API en javascript
let weather={ key:"your api key", getweather(city){ fetch(`https://api.openweathermap.org/data/2.5/forecast? q=${city}&appid=${this.key}&units=metric`) .then(res => res.json()) .then(data => this.show(data)) const encodeurl=encodeURI(fetch); }, show(data){ **const{lat,lon}=data.city.coord;** console.log(lat,lon); } } weather.getweather("mumbai");