little-caravan-5775
10/21/2023, 11:57 AMjavascript
const foundList = workflow.found
const order = workflow.order
for (const item of foundList) {
const existingItem = order.find((i) => i.label === item.label)
const value = parseInt(item.value)
if (existingItem) {
existingItem.value += value
} else {
order.push({ label: item.label, value: value })
}
}
how is that creating default values in the order variable?