title: How i can convert array of object into array then a unique count of array
body: <pre><code>const form = [
      {
          &quot;_id&quot;: &quot;61436aa8deef0390dcfdea79&quot;,
          &quot;user&quot;: &quot;613f92eb98da0c5facc1b4ca&quot;,
          &quot;registerName&quot;: &quot;Edwin&quot;,
          &quot;email&quot;: &quot;edwin@asng.space&quot;,
          &quot;category&quot;: &quot;Urusan Lain Lain&quot;,
          &quot;title&quot;: &quot; Ah Yong&quot;,
          &quot;contactNumber&quot;: &quot;0191231232&quot;,
      --&gt; &quot;time&quot;: &quot;8am&quot;,
          &quot;dateBooking&quot;: &quot;2021-09-18&quot;,
          &quot;icNumber&quot;: &quot;860909-49-5851&quot;,
          &quot;date&quot;: &quot;2021-09-16T16:02:48.457Z&quot;,
          &quot;__v&quot;: 0
      },
      {
          &quot;_id&quot;: &quot;61436ab8deef0390dcfdea7a&quot;,
          &quot;user&quot;: &quot;613f92eb98da0c5facc1b4ca&quot;,
          &quot;registerName&quot;: &quot;ESTSETS&quot;,
          &quot;email&quot;: &quot;123@gmail.com&quot;,
          &quot;category&quot;: &quot;Daftar Baru&quot;,
          &quot;title&quot;: &quot; Ah Yong&quot;,
          &quot;contactNumber&quot;: &quot;0149530130&quot;,
      --&gt; &quot;time&quot;: &quot;8am&quot;,
          &quot;dateBooking&quot;: &quot;2021-09-18&quot;,
          &quot;icNumber&quot;: &quot;123123123123&quot;,
          &quot;date&quot;: &quot;2021-09-16T16:03:04.211Z&quot;,
          &quot;__v&quot;: 0
      },
      {
          &quot;_id&quot;: &quot;61436b1894116c90f82170b9&quot;,
          &quot;user&quot;: &quot;613f92eb98da0c5facc1b4ca&quot;,
          &quot;registerName&quot;: &quot;Ah Yong&quot;,
          &quot;email&quot;: &quot;312@gmail.com&quot;,
          &quot;category&quot;: &quot;Pertanyaan&quot;,
          &quot;title&quot;: &quot; Ah Yong&quot;,
          &quot;contactNumber&quot;: &quot;0149530130&quot;,
     --&gt;  &quot;time&quot;: &quot;9am]&quot;,
          &quot;dateBooking&quot;: &quot;2021-09-18&quot;,
          &quot;icNumber&quot;: &quot;123654&quot;,
          &quot;date&quot;: &quot;2021-09-16T16:04:40.962Z&quot;,
          &quot;__v&quot;: 0
      }
  ]
  </code></pre>
  <p>How can i convert <code>time</code> inside the object into</p>
  <pre><code>uniqueCount = [8am,9am,10am,8am,9am,10am,8am,9am,10am,11am];
  </code></pre>
  <p>and count the frequency of each time in the array? I want to have a result like:</p>
  <pre><code>8am = 3
  9am = 3
  10am = 3
  11am = 1
  </code></pre>
  <p>I'm not sure whether this will work cause I would like to filter each time got how many people to create an condition.</p>