Hey there! I'm a new developer working with Vue JS. I have a response body where I need to sum the amount
values that have is_paid:true
using only the paid_amount
. Can someone guide me on how to achieve this in Vue JS?
Edit: For example, I want to add up 30 (amount
) and 20 (
paid_amount>), excluding 100 as it has <code>is_paid:false
.
{
"payment" : {
"installment_payment" : {
"installments" : [
amount:30,
date: "",
is_paid: true,
},
{
amount: 100,
date: "",
is_paid: false,
},
{
amount: "",
date: "",
is_paid: false,
},
{
amount: "",
date: "",
is_paid: true,
}
],
remaining: ""
},
paid_amount: 20,
},
}