title: How to merge arrays of different objects in Swift
body: <p>It sounds simple, but how can I merge two arrays of different types (Simpson &amp; Movie) in Swift, then go on to order that array of objects alphabetically by their only common property - in this case 'name'?</p>
  
  <pre><code>struct Simpson {
      var age: Int
      var name: String
      init(age: Int, name: String) {
          self.age = age
          self.name = name
      }
  }
  let homer = Simpson(age: 39, name: "Homer")
  let marge = Simpson(age: 36, name: "Marge")
  var simpson = [homer, marge] // [{age 39, name "Homer"}, {age 36, name "Marge"}]
  
  struct Movie {
      var location: String
      var name: String
      init(location: String, name: String) {
          self.location = location
          self.name = name
      }
  }
  let jaws = Movie(location: "Amity", name: "Jaws")
  let et = Movie(location: "LA", name: "E.T")
  var movies: [Movie] = [jaws, et] // [{location "Amity", name "Jaws"}, {location "LA", name "E.T"}]
  </code></pre>