Check out example codes for ".joined(separator in array of object swift". It will help you in understanding the concepts better.

Code Example 1

let nestedNumbers = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
let joined = nestedNumbers.joined(separator: [-1, -2])
print(Array(joined))
// Prints "[1, 2, 3, -1, -2, 4, 5, 6, -1, -2, 7, 8, 9]"

Learn ReactJs, React Native from akashmittal.com