title: Sorting an array of dictionaries in Swift 2
body: <p>I've read many articles on SO and I'm still stumped! I have an array of dictionaries, see below:</p>
  
  <pre><code>var myArray = [[String:AnyObject]]()
  
  myArray.append([
      "caseNumber" : "12349",
      "formType" : "Advanced",
      "caseStatus" : "Approved",
      "caseDetails" : "blah blah",
      "caseLUD" : NSDate(),
      "friendlyName" : "name1"
      ])
  
  myArray.append([
      "caseNumber" : "12345",
      "formType" : "Standard",
      "caseStatus" : "On-Hold",
      "caseDetails" : "blah blah",
      "caseLUD" : NSDate(),
      "friendlyName" : "name2"
      ])
  
  myArray.append([
      "caseNumber" : "12342",
      "formType" : "Normal",
      "caseStatus" : "Rejected",
      "caseDetails" : "blah blah",
      "caseLUD" : NSDate(),
      "friendlyName" : "name3"
      ])
  </code></pre>
  
  <p>This data will go into a tableView and I want the user to be able to decide the sort order, either by <code>caseNumber</code> or my <code>caseLUD</code> (date). But I can't figure out how to re-order the array by values. Any ideas, please? All help appreciated.</p>