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

168
Visualizações
Saving description from nested data in React

I'm trying to save all descriptions from a nested data return. I can save the description of a single index on my fetch. When I try to do it anywhere outside of the fetch, I get the error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'c'). C is the final section of the nested results (data[1].c[1].v). I'm not sure exactly what I'm doing wrong. I can pass the info down to the jsx and display it, but I still need to loop through all the descriptions. Any tips would be helpful.

const jsonData = JSON.parse(data.substring(47).slice(0,-2));
      setSpreadsheetData(jsonData.table.rows[1].c[1].v)

This is what returns the single description for the data. The first 1 index is what I need to loop through to get each result. Everything after is the exact path for the description. Any tips in the right direction would be helpful.

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