title: Sort an array of dictionaries in Swift
body: <p>Suppose we have </p>
  
  <pre><code>var filesAndProperties:Dictionary&lt;String, Any&gt;[]=[] //we fill the array later
  </code></pre>
  
  <p>When I try sorting the array using</p>
  
  <pre><code>filesAndProperties.sort({$0["lastModified"] &gt; $1["lastModified"]})
  </code></pre>
  
  <p>Xcode says "could not find member subscript".</p>
  
  <p>How do I sort an array of such dictionaries by values in a specific key?</p>