How can I combine multiple NSArrays into one array with alternating values? For example.
Array One: Orange, Apple, Pear
Array Two: Tree, Shrub, Flower
Array Three: Blue, Green, Yellow
The final array would need to be: Orange, Tree, Blue, Apple, Shrub, Green, etc
[@[@[@1,@2],@[@3,@4],@[@5,@6]] valueForKeyPath:@"@unionOfArrays.self"]
So once you have a array of arrays you call unionOfArrays collection operator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With