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

147
Visualizações
Having issues getting data from api call

Hey guys Im making a api call and getting a response I have not yet encountered . my api call is basic and looks like

async function getStudents(){
          const response = await fetch('url');
          const studentData = response.json();
    
         console.log(studentData)

Promise { : "pending" } : "fulfilled" : Object { students: (25) […] }

and these are the results I get, Normally I could do something like studentData.students to get that object but nothing seems to get the correct object. what am I doing wroing?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Use something like this :

async function getStudents(){
   fetch('url')
  .then(response => response.json())
  .then(data => console.log(data));
  .catch(error=>console.log(error,"error  occured"));

}
about 4 years ago · Juan Pablo Isaza Relatório
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