title: Find closest date from array of objects to given date
body: <p>I have a JSON file that contains objects of dates in the &quot;dd/mm/yyyy&quot; format.
  I'd like to find the day closest to today using Javascript. I have already figured out how to get the current date in the respective format but now I'm struggling to find a way to get the closest one. I'd appreciate any help, so far I'm always getting the very first item whatever I try (I haven't found anything that works for me here).
  Example JSON:</p>
  <pre><code>[
    {
    &quot;match&quot;: &quot;Liverpool - Chelsea&quot;,
    &quot;league&quot;: &quot;PL&quot;,
    &quot;date&quot;: &quot;20/06/2021&quot;,
    &quot;venue&quot;: &quot;Liverpool&quot;
    },
    {
    &quot;match&quot;: &quot;Manchester - Arsenal&quot;,
    &quot;league&quot;: &quot;PL&quot;,
    &quot;date&quot;: &quot;15/08/2021&quot;,
    &quot;venue&quot;: &quot;Manchester&quot;
    }
  ]
  </code></pre>