Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return Object.keys(batch).reduce(function(result, key) {
- let total = batch[key].Count2017 + batch[key].Count2018;
- result.Batch[key] = {
- BatchID: key,
- Name: batch[key].Name,
- Total: total
- };
- result.GrandTotal += total;
- return result;
- }, { Batch: {}, GrandTotal: 0 });
Add Comment
Please, Sign In to add comment