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

194
Views
¿Cómo puedo deshacerme de "" en formato JSON?

Estoy tratando de representar datos con formato JSON usando la biblioteca React Victory aquí está .

ejemplo de componente:

 const data = [ {quarter: 1, earnings: 13000}, {quarter: 2, earnings: 16500}, {quarter: 3, earnings: 14250}, {quarter: 4, earnings: 19000} ]; class App extends React.Component { render() { return ( <VictoryBar data={data} // data accessor for x values x="quarter" // data accessor for y values y="earnings" /> ) } } ReactDOM.render(<App/>, mountNode);

pero obtengo mis datos de API en formato JSON

aviso formato de datos:

 const data = { "historical" : [ {"quarter": 1, "earnings": 13000}, {"quarter": 2, "earnings": 16500}, {"quarter": 3, "earnings": 14250}, {"quarter": 4, "earnings": 19000} ]};

¿Qué tipo de matriz se usa en el primer fragmento?

¿Y cómo puedo hacerlo desde el segundo?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use data.historical como matriz en su componente.

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