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

195
Views
How can i get rid of "" in JSON format?

I am trying to represent JSON formated data Using React library Victory here it is.

example of component:

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);

but I get my data from API in JSON format

notice format of data:

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

What type of array is used in first fragment?

And how can I make it from the second?

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

0

Use data.historical as the array in your component.

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!