title: Sorting of array of dictionary with date Swift 3
body: <p>I have an array called myArray in which dictionaries are added I want that dictionary to be sorted by time which is a key in dictionary. And that time is in String. The date format of time is "yyyy/MM/dd HH:mm:ss"</p>
  
  <p>I tried with below code solution but gives a warning of "Cast from 'String?' to unrelated type 'Date' always fails". </p>
  
  <pre><code>let sortedArray = self.myArray.sorted{ ($0["Time"] as? Date)! &gt; ($1["Time"] as? Date)! }
  print(sortedArray)
  </code></pre>
  
  <p>If anyone can help me out, Thank You.</p>