Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!