Imagine my input request is structured like this:
{
"totalAmount": 0,
"items": [
{"name": "hotdog", "price": 10},
{"name": "burger", "price": 20}
]
}
The desired output must be:
{
"totalAmount": 30,
"items": [
{"name": "hotdog", "price": 10},
{"name": "burger", "price": 20}
]
}
I'm attempting to achieve this using an expression node in loop mode, but I cannot access and modify the totalAmount field while iterating through the loop
Imagine my input request is structured like this:
{ "totalAmount": 0, "items": [ {"name": "hotdog", "price": 10}, {"name": "burger", "price": 20} ] }The desired output must be:
{ "totalAmount": 30, "items": [ {"name": "hotdog", "price": 10}, {"name": "burger", "price": 20} ] }I'm attempting to achieve this using an expression node in loop mode, but I cannot access and modify the totalAmount field while iterating through the loop