We have an array of the Person objects and each object has another array of String, which is optional. We want the consolidated list of car names in our society.
You need to call flatMap once more for array containing Optionals: personsArray.flatMap { $0.cars }.flatMap { $0 }
flatMap