I have data in the following format
[\"DATA1-1\",\"DATA1-2\",\"DATA1-3\",\"DATA1-4\",\"\",\"DATA2-1\",\"DATA2-2\",\"DATA2-3\",\"DATA2-4\",\"\",\"DATA3-1\",\"DATA3-2\",\"
The code now works with Swift 2.2
Try like this:
func arraySliceFunction(array: [String]) {
// Slice the master array with all combinations of airways into separate arrays
// Iterate through the each subArray
for subArray in array.split("") {
// Iterate through each item in subArray
for item in subArray {
print("SLICES COMPONENT: \(item)")
}
}
}