getting a sum of a property of json objects

JavaScript
bills.map(bill => bill.pendingAmount).reduce((acc, bill) => bill + acc);
Source

Also in JavaScript: