I want to calculate the cost and i am stuck from past 1 hour.Here is my data
Todo: [{
name: "primary",
items: [{
item: 'Todo itme #1',
isDone: false,
cost: 0
}]
}, {
name: "Secondary",
items: [{
item: 'Todo itme #1',
isDone: false,
cost: 0
}]
}]
I want to loop on all items and compute the total cost.
- I have tried using for loops
- using map within a map
but I am not able so solve it.
Entries inside items array can increase dynamically.
Please guide!