Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

104
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda