I have a treetable with multiple parents, in which I am trying to make the sum of the children items.
They are loaded already grouped by Json like this:
data = [
{ item: "01", data: [
{item: "01.01", data: [
{item: "01.01.01", value: 100 },
{item: "01.01.02", value: 50 } ]},
{item: "01.02" , data: [
{item: "01.02.01", value: 100 },
{item: "01.02.02", value: 50 } ]}
]},
{ item: "02", data: [
{item: "02.01", data: [
{item: "02.01.01", value: 100 },
{item: "02.01.02", value: 50 } ]},
{item: "02.02" , data: [
{item: "01.02.01", value: 100 },
{item: "02.02.02", value: 50 } ]}
]}
]
I need parents to present the sums of their children’s values. How can I do this?