title: How To Grouping Array Data With Date From Ajax Response?
body: <p>i have array data like this</p>
  
  <pre><code>[{ 
     date: "January 2019",
     sum: 20,
     name: "Persada",
  },{ 
     date: "Februay 2019",
     sum: 21,
     name: "Persada",
  },{ 
     date: "April 2019",
     sum: 22,
     name: "Persada",
  },{ 
     date: "January 2019",
     sum: 10,
     name: "Kharisma",
  },{ 
     date: "March 2019",
     sum: 5,
     name: "Kharisma",
  },{ 
     date: "Februari 2019",
     sum: 4,
     name: "Solusindo",
  },{ 
     date: "Mai 2019",
     sum: 2,
     name: "Solusindo",
  }]
  </code></pre>
  
  <p>From the data above, I have chosen a different date. so I get a date like this</p>
  
  <pre><code>["January 2019", "February 2019", "March 2019", "April 2019", "Mai 2019"]
  </code></pre>
  
  <p>and then i want to set data like this</p>
  
  <pre><code>[{
     date : ["January 2019", "February 2019", "March 2019", "April 2019", "Mai 2019"],
     sum: [20, 21, 0, 22, 0],
     name: "Persada",
  },{
     date : ["January 2019", "February 2019", "March 2019", "April 2019", "Mai 2019"],
     sum: [0, 0, 10, 5, 0],
     name: "Kharisma",
  },{
     date : ["January 2019", "February 2019", "March 2019", "April 2019", "Mai 2019"],
     sum: [0, 4, 0, 0, 2],
     name: "Solusindo",
  }]
  </code></pre>
  
  <p>if there is no data on that date, then the data sum will automatically be replaced by 0. please help me to set data like that. thank you</p>