How can I to sum elements of a JSON array like this, using jQuery:
"taxes": [
{ "amount": 25, "currencyCode": "USD", "decimalPlaces": 0, "taxCode": "YRI" },
{ "amount": 25, "currencyCode": "USD", "decimalPlaces": 0, "taxCode": "YRI" },
{ "amount": 10, "currencyCode": "USD", "decimalPlaces": 0, "taxCode": "YRI" }
]
The result should be:
totalTaxes = 60
taxes[i].amount?