let arrayOfArrays = [ [1, 2], [3, 4]]
let flatArray = arrayOfArrays.flatMap { $0 }
print(flatArray) // [1, 2, 3, 4]