First of all, you should rewrite your Person class. firstName and lastName shouldn't be optional, since everyone has both a first and a last name and unless your app will specifically be made for people who were born in Belgium, hardcoding that as the birthPlace is also a bad idea.
Take the time and write an initializer for the class.
class Person {
var firstName: String
var lastName: String
let birthPlace: String
init(firstName: String, lastName: String, birthPlace: String){
self.firstName = firstName
self.lastName = lastName
self.birthPlace = birthPlace
}
}
You can use map to get an array of first names from an array of Person objects.
let people = [Person]()
let firstNames = people.map{$0.firstName}
firstNameandlastNameoptional? In practice everybody has a first and last name. Don't use optionals as an alibi not to write an initializer. That's very bad habit.