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

105
Vistas
JSON print to HTML

Any idea what's the best way to get json from webhook to HTML? I already got to the step where I can print the json from the webhook and a json in script and It looks THE SAME but the one from webhook gives "undefined".

<body>
   
 <h2>Print from Integromat</h2>

 <p id="demo"></p>

 <script>
   let xhr = new XMLHttpRequest();
   xhr.open("POST", "https://hook.integromat.com/xyxyxyxyxyxyxyxyxyx", true);
   xhr.setRequestHeader('Content-Type', 'application/json');
   xhr.onload = function(e) {
     // Error...
     if (this.status != 200) return alert("Error")
     // Success..

     let json = JSON.stringify(this.response);

     let text = "";

     for(let i = 0; i < json.length; i++) {
       let obj = json[i];
       text += obj.firstname + "<br>";
       text += obj.email + "<br><hr>"
     }

     document.getElementById("demo").innerHTML = text;

   }

   xhr.send(JSON.stringify({
     //JSON to send
     date: new Date(),
   }));
 </script>
</body>

Thanks a lot!

about 4 years ago · Santiago Gelvez
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