Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

136
Vistas
how to access fetch api object

hello just wondering how do I access the temperature? do I have to stringify or just use the data? Im very new to programming and don't know how to access stringifyed object

code below

fetch(
    "https://api.openweathermap.org/data/2.5/weather?q=Zushi,japan&APPID=undefined&units=metric"
)
    .then((response) => response.json())
    .then((data) => {
        console.log(data);
        // let myJSON = JSON.stringify(data);
        document.getElementById("temp").innerHTML = data[0];
    });

this is the object im trying to access and append to html page?

object = {coord: {…}, weather: Array(1), base: 'stations', main: {…}, visibility: 10000, …}
base: "stations"
clouds: {all: 28}
cod: 200
coord: {xxxxxxx}
dt: 1656072014
id: 1847968
main: {temp: 26.87, feels_like: 29.9, temp_min: 26.38, temp_max: 28.8, pressure: 1006, …}
name: ""
sys: {type: 2, id: 20510, country: 'JP', sunrise: 1656012469, sunset: 1656064800}
timezone: 32400
visibility: 10000
weather: [{…}]
wind: {speed: 12.05, deg: 217, gust: 17.58}
[[Prototype]]: Object
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda