Guest User

Untitled

a guest
Dec 16th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. return Object.keys(batch).reduce(function(result, key) {
  2. let total = batch[key].Count2017 + batch[key].Count2018;
  3. result.Batch[key] = {
  4. BatchID: key,
  5. Name: batch[key].Name,
  6. Total: total
  7. };
  8. result.GrandTotal += total;
  9. return result;
  10. }, { Batch: {}, GrandTotal: 0 });
Add Comment
Please, Sign In to add comment