title: Sort array of custom objects by date swift
body: <p>I have a custom object "Meeting" I am adding all the objects in an array. What I want to do is sort the array from Meeting.meetingDate. </p>
  
  <p>I'm also using Parse, I have two queries and putting the results into one array.</p>
  
  <p>I am able to add the data to "meetingData", but not sort it.</p>
  
  <p>Can anyone help with this?</p>
  
  <p>So my array is:</p>
  
  <pre><code>var meetingsData = [Meeting]()
  </code></pre>
  
  <p>The Meeting class is:</p>
  
  <pre><code>public class Meeting: PFObject, PFSubclassing
  {
  
    @NSManaged public var meetingTitle: String?
    @NSManaged public var meetingLocation: String?
    @NSManaged public var meetingNotes: String?
    @NSManaged public var meetingDuration: String?
    @NSManaged public var createdBy: User?
    @NSManaged public var meetingTime: NSDate?
    @NSManaged public var meetingDate: NSDate?
  
  }
  </code></pre>
  
  <p>The contents of the array is like so:</p>
  
  <pre><code>&lt;Meeting: 0x125edd040, objectId: xIqx7MoRd6, localId: (null)&gt; {
  createdBy = "&lt;PFUser: 0x125d627c0, objectId: RKCWJRj84O&gt;";
  meetingDate = "2015-08-29 17:07:12 +0000";
  meetingDuration = "2 hours 2 mins";
  meetingLocation = 4th Floor;
  meetingNotes = With Investors;
  meetingTime = "2015-08-24 09:00:17 +0000";
  meetingTitle = Meeting with Investors;
  }
  &lt;Meeting: 0x125ed95f0, objectId: tz4xx5p9jB, localId: (null)&gt; {
  createdBy = "&lt;PFUser: 0x125d627c0, objectId: RKCWJRj84O&gt;";
  meetingDate = "2015-08-23 23:00:00 +0000";
  meetingDuration = "1 hour";
  meetingLocation = "Emirates Stadium, London";
  meetingNotes = "Football";
  meetingTime = "2000-01-01 20:00:00 +0000";
  meetingTitle = "Liverpool V Arsenal";
  }
  &lt;Meeting: 0x125ed95f0, objectId: tz4xx5p9jB, localId: (null)&gt; {
  createdBy = "&lt;PFUser: 0x125d627c0, objectId: RKCWJRj84O&gt;";
  meetingDate = "2015-09-23 23:00:00 +0000";
  meetingDuration = "1 hour";
  meetingLocation = "Library";
  meetingNotes = "Dev Team";
  meetingTime = "2000-01-01 10:00:00 +0000";
  meetingTitle = "Code Review";
  }
  </code></pre>
  
  <p>I have tried to do this <a href="https://stackoverflow.com/questions/24130026/swift-how-to-sort-array-of-custom-objects-by-property-value">Swift how to sort array of custom objects by property value</a> but it doesn't work</p>
  
  <p>Thanks in advance</p>