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

208
Views
How programically make json to have date to tabulatory react?

My idea is quite complex, because I want to create something similar to { id: 1, Rok: 1, Cena: chart1, cena2: chart2 }, to have date to use in tabulator. I thought that I can create by loop for. I take props from parent, which want to use as a date.

function Table ({chart1, chart2}){
    const Data = [index, rok, data1, data2 ]
    const data1 = [];
    const data2 = [];
    const index = [];
    const rok = [];

    for(i  = 0; i< 25; i++) {
data1.push(chart1[i]);
data2.push(chart2[i]);
rok.push(`rok + ${i}`);
index.push(i);
    }

but the result of the operation will be look like

[ [1,2,3,4,5,6..], [rok1, rok2, rok3....], [], []  ]

then I thought about something differ, but do not work as well:

function Table ({chart1, chart2}){
    const Data = [];
    for(i=0; i<25; i++){
    Data.push(
    `{`"rok": + "rok" i + "id:" + i + "cena1:" + chart1[I] + "cena2": chart2[I]`}` );
    }
()}
about 4 years ago · Santiago Trujillo
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!