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

136
Views
¿Cómo tomar información JSON y dársela a un componente React?

La solicitud de recuperación (de Hojas de cálculo de Google) devuelve stats , que es una matriz de matrices. En las stats hay una lista de equipos con sus victorias y derrotas (uno de ellos se ve así ['Cannons', '4', '2'] , como se ve en teams . Quiero que las stats llenen automáticamente mi matriz de teams o dárselo a la propiedad de data en Table ¡Gracias por tu ayuda!

 const getSheetValues = async () => { const request = await fetch(`https://sheets.googleapis.com/v4/spreadsheets/${SHEET_ID}/values/A1:C7`, { headers: { "Content-Type": "application/json", Authorization: `Bearer ${ACCESS_TOKEN}` } }); const stats = await request.json(); console.log(stats); return stats; } const teams = [ { team: 'Cannons', wins: 4, loss: 2 }, { team: 'Rhythm', wins: 1, loss: 5 } ] const Standings = () => { return ( <div className='cont'> <div className='standings'> <Table columns={columns} data={teams} className='tbl' /> </div> </div> ) }
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!