title: how to transform object of objects to object of array of objects js
body: <p>I'm currently working on a <code>react-native</code> project which includes a calendar screen. I'm using <code>react-native calendars</code> agenda component for the calendar itself and a <code>firebase</code> realtime database for the project itself. I'm quite new at crating my own database so straggling to get the figure our the data structure right.
  Currently, from the database, I get the data as</p>
  <pre><code>{
  '2020-07-01': {time: &quot;12:00&quot;, topic: &quot;Type Casting in JavaScript&quot;}
  '2020-07-03': {time: &quot;12:00&quot;, topic: &quot;JavaScript basics&quot;}
  '2020-07-06': {time: &quot;12:00&quot;, topic: &quot;Parallax Scrolling&quot;}
  }
  </code></pre>
  <p>but rest-native calendars agenda only accepts data in a form of</p>
  <pre><code>{
  '2020-07-01': [{time: &quot;12:00&quot;, topic: &quot;Type Casting in JavaScript&quot;}]
  '2020-07-03': [{time: &quot;12:00&quot;, topic: &quot;JavaScript basics&quot;}]
  '2020-07-06': [{time: &quot;12:00&quot;, topic: &quot;Parallax Scrolling&quot;}]
  }
  </code></pre>
  <p>what would be the best way to transform the output?</p>