title: lodash groupBy on javascript or typescript
body: <p>i have following query result.</p>
  <pre><code>[
    {
      INTERVIEW_DT: &quot;20220823&quot;,
      DEPT_ID: &quot;c97852f5-3d71-41ae-81f7-bb5df2a321ba&quot;,
      RECRUIT_COUNT: 1,
      INTERVIEW_CNT: 1,
      PASS_CNT: 0,
    },
    {
      INTERVIEW_DT: &quot;20220823&quot;,
      DEPT_ID: &quot;d9608b11-fa24-4f53-bad4-0ea2cf375ade&quot;,
      RECRUIT_COUNT: 3,
      INTERVIEW_CNT: 1,
      PASS_CNT: 1,
    },
    {
      INTERVIEW_DT: &quot;20220824&quot;,
      DEPT_ID: &quot;c97852f5-3d71-41ae-81f7-bb5df2a321ba&quot;,
      RECRUIT_COUNT: 5,
      INTERVIEW_CNT: 3,
      PASS_CNT: 1,
    },
    {
      INTERVIEW_DT: &quot;20220824&quot;,
      DEPT_ID: &quot;d9608b11-fa24-4f53-bad4-0ea2cf375ade&quot;,
      RECRUIT_COUNT: 2,
      INTERVIEW_CNT: 2,
      PASS_CNT: 1,
    },
  ]
  </code></pre>
  <p>I need to groupBy &quot;INTERVIEW_DT&quot; and &quot;DEPT_ID&quot; with sum<br/>
  top key is &quot;DATE&quot;, &quot;TOTAL&quot;.<br/></p>
  <p>&quot;DATE&quot; is group by INTERVIEW_DT and DEPT_ID<br/>
  &quot;TOTAL&quot; group by DEPT_ID and then sum. regardless of &quot;INTERVIEW_DT&quot;<br/></p>
  <p>i want to following result using with javascript or typescript <br/>
  please help me.</p>
  <pre><code>{
      'DATE': [{
          '20220823': [{
              'c97852f5-3d71-41ae-81f7-bb5df2a321ba': {
                  'RECRUIT_COUNT': 1,
                  'INTERVIEW_CNT': 1,
                  'PASS_CNT': 0
                  },
              },
              {
                  'd9608b11-fa24-4f53-bad4-0ea2cf375ade': {
                  'RECRUIT_COUNT': 3,
                  'INTERVIEW_CNT': 1,
                  'PASS_CNT': 1
                  }
              }
          ],
          '20220824': [{
              'c97852f5-3d71-41ae-81f7-bb5df2a321ba': {
                  'RECRUIT_COUNT': 5,
                  'INTERVIEW_CNT': 3,
                  'PASS_CNT': 1
              },
          },
          {
              'd9608b11-fa24-4f53-bad4-0ea2cf375ade': {
                  'RECRUIT_COUNT': 2,
                  'INTERVIEW_CNT': 2,
                  'PASS_CNT': 1
              }
          }
          ],
      }],
      'TOTAL': [{
          'c97852f5-3d71-41ae-81f7-bb5df2a321ba': {
              'RECRUIT_COUNT': 6,
              'INTERVIEW_CNT': 5,
              'PASS_CNT': 1
              },
          },
          {
              'd9608b11-fa24-4f53-bad4-0ea2cf375ade': {
              'RECRUIT_COUNT': 5,
              'INTERVIEW_CNT': 3,
              'PASS_CNT': 2
              }
          }
      ]
  }
  </code></pre>
  <p>thank you</p>