I have for loop items as follows:
"itemDtls": [
{
"ID": A1299,
"Name": "Fresh Tomato",
"Quantity": 2,
},
{
"ID": A1230,
"Name": "Spaghetti",
"Quantity": 1,
},
{
"ID": A1335,
"Name": "Granola",
"Quantity": 5,
},
],
I did a for-loop to iterate these items:
{{for itemDtls}}
<col>{{>Name}}</col>
<col>{{>Quantity}}</col>
{{/for}}
This ends up fine, but I would like to also get the total of the 'Quantity' (that would be 8)
How to achieve that?
Never worked with jsviews but if you want it in the view maybe try something like this:
If you don't want it in the view, I think you can compute it before hand, store it in a variable and show that variable.