title: How to recalculate an object from a nested objects?
body: <p>I have an object where Citems is an array of Object. Each object has status on or of and time.</p>
  <pre><code>{
    Chapter: [
      {
        Cname: 'chapter 1',
        Citems: [{status: 'on', time: 30},{status: 'on', time: 60}],
        
      },
      {
        Cname: 'chapter 2',
        Citems: [{status: 'on', time: 30},{status: 'off', time: 60}]
      }
    ],
    name: 'Something',
    description: 'jfdgljfgdfjgldfkjglfd'
  }
  </code></pre>
  <p>I want to generate an array or object from it that show total time for each status like below</p>
  <pre><code>{
  on: 120,
  off: 60
  }
  </code></pre>
  <p>I tried with map and reduce but getting confused.</p>