title: Merge object data with same date
body: <p>I have the following array I need help with.</p>
  <pre><code>let test = [
  {
    date: [&quot;2021-11-09&quot;, &quot;2021-11-09&quot;, &quot;2021-11-10&quot;, &quot;2021-11-10&quot;],
    amount: [0.5, 0.5, 1, 2],
  }];
  </code></pre>
  <p>How can I merge the amounts that have the same date? I want the data to be returned as below:</p>
  <pre><code>date: [&quot;2021-11-09&quot;, &quot;2021-11-10&quot;],
  amount: [1, 3],
  </code></pre>
  <p>Thank you in advance!</p>