title: How to sort nested array of objects by date
body: <p>I am creating simple News application, And i am using Firebase as back-end, I have stored News articles in Cloud firestore, In my fields i have News publication time <code>hr:min:sec</code> I want to sort received data by publication time, from the latest to the oldest, any solutions? Thanks in advance</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var data = [ 
      { news: [ 
            { published_at: "2/22/2021",
             imgUrl: "", 
             id: 159783, 
             title: "short descr", 
             date: "18:11:53", 
             previewText: "some kind of title" } 
             ], 
            newsId: "5GTAbGLfS0hSCOkmTfHD" 
         }, 
  
         
             
        { news: [ 
            { id: 159783,
             published_at: "2/22/2021", 
             previewText: "some kind of title2",
              title: "short descr", 
              date: "17:19:53", 
              imgUrl: "" 
              } 
           ], 
        newsId: "lw2hzVe0m3dbcmvBj4Vz" } 
    ]
  
    data.forEach((item)=&gt;{
        var singleItem = item.news
       const finalResult = singleItem.sort((a, b) =&gt; b.date - a.date)
       console.log(finalResult)
    })</code></pre>
  </div>
  </div>
  </p>