Im wondering what the best way is to perform some calculations based on JSON Data.
Im building an app for creating quotes. The dataset for the quote is stored in a JSON and is displayed in a repeatable List. I have chunked together a calculation that runs in a JS query but I'm sure there's a better way as I don't want to have to execute JS each time to recalculate, Unless this can all be done in 1 query. I'm most hopeful this can be done in a transformer.
1 Field i would like to sum within the repeatable is {{itemLineTotal.value}}
If there's a way to calc based off of the item JSON, I feel this may be more Ideal as I would want it to run calculations for Items, Categories, and a quoteTotal. it follows this schema.
{
"id": 1132,
"name": "Test Quote",
"quoteTotal": null,
"categories": [
{
"categoryName": "Hardware and Installation",
"categoryId": 1,
"categorySubtotal": null,
"categoryFitHrs": null,
"categoryLaborPrice": null,
"items": [
{
"itemId": 1,
"itemProductId": 123,
"itemQty": 1,
"itemMarkup": 66.7,
"itemPrice": 150,
"itemFitTime": 20,
"itemFitMultiplier": 1,
"itemLineTotal": 250,
"itemSubRequired": false,
"itemSubPrepay": false
}
]
}
]
}