Is there a way to map an object, add specific values, and then calculate the total? I am looking to map the object below and extract certain items. Any suggestions?
Object:
[
{
"description": "Current Term",
"monthlyRent": 29971.599999999995,
"monthsInPeriod": 41.7,
"rentInPeriod": null
},
{
"description": "Current Term - Rent Adjustment",
"monthlyRent": 31470.180000000004,
"monthsInPeriod": 47.96666666666667,
"rentInPeriod": 1509519.634
}
]
29971.599999999995 + 41.7 = 30,012
31470.180000000004 + 47.96666666666667 = 31,517
Desired Result: should be
total = 30,012 + 31,517