title: create array for each same month in javascript
body: <p>i have got an  response with number of <strong>values</strong> with same <strong>month</strong>.</p>
  <p>If you can see the left one (TAR_HEF_01,TAR_HEF_02...)are the months and right one are the values for the same.</p>
  <p>in this each month (lets say TAR_HEF_01) contain 4 values.</p>
  <p>i have 6 months in a array.i have got monthIndexValue through loop like below.</p>
  <pre><code>hebrewMonthArray.forEach((monthValue, index) =&gt; {
  let monthIndex = hebrewMonthArray.indexOf(hebrewMonthArray[index]);
        monthIndexValue =
          monthIndex &lt; 9
            ? `TAR_HEF_0${monthIndex + 1}`
            : `TAR_HEF_${monthIndex + 1}`;
  
  </code></pre>
  <p>i have got value like below</p>
  <pre><code>Object.keys(allWorkDetails).forEach((work, index) =&gt; {
  let value = allWorkDetails[work][monthIndexValue][0] || 0;
   }); 
  });     
  </code></pre>
  <p>**Here is the console of <strong>monthIndexValue</strong> and <strong>value</strong> **:---</p>
  <pre><code>TAR_HEF_01 0
  TAR_HEF_01 0
  TAR_HEF_01 0
  TAR_HEF_01 0
  TAR_HEF_02 0
  TAR_HEF_02 0
  TAR_HEF_02 0
  TAR_HEF_02 0
  TAR_HEF_03 0
  TAR_HEF_03 0
  TAR_HEF_03 0
  TAR_HEF_03 0
  TAR_HEF_04 0
  TAR_HEF_04 0
  TAR_HEF_04 0
  TAR_HEF_04 0
  TAR_HEF_05 0
  TAR_HEF_05 0
  TAR_HEF_05 0
  TAR_HEF_05 0
  TAR_HEF_06 90
  TAR_HEF_06 9
  TAR_HEF_06 -200.8
  TAR_HEF_06 214.9
  </code></pre>
  <p>i want to create one array for each month contain their values.</p>
  <p>if i will put <strong>console(monthIndexValue,arrayOfValue);</strong></p>
  <p>the output should be:---</p>
  <pre><code>TAR_HEF_01 [0,0,0,0]
  TAR_HEF_02 [0,0,0,0]
  TAR_HEF_03 [0,0,0,0]
  TAR_HEF_04 [0,0,0,0]
  TAR_HEF_05 [0,0,0,0]
  TAR_HEF_06 [90,9,-200.8,214.9]
  </code></pre>
  <p>How can i solve? Thanks...</p>