How to generate dynamic colspan table from json data in javascript react. In obj,
w1,w2 represents the groupheader, t1,t2 represents header
for each item, display the data according to time which is grouped by week, any libraries or any possible way to create , I really got stuck.
var obj = {
options: {
w1: {start:"sep",end: "6"},
w2: {start:"nov", end: "5"}
},
intervals: {
t1: {begin: "1", end: "2", totalqty: 2,totalamt: 200},
t2: {begin: "4", end: "7", totalqty: 3, totalamt: 300},
}
items: [
{
name: "s1",
desc: "sample1",
w1: {t1: {qty:0, amt: 100},t2: {qty:1, amt: 200}},
w2: {t1: {qty:1, amt: 100},t2: {qty:2, amt: 200}}
}
{
name: "s2",
desc: "sample2",
w1: {t1: {qty:0, amt: 100},t2: {qty:0, amt: 0}},
w2: {t1: {qty:0, amt: 0},t2: {qty:1, amt: 200}}
}
]
}
