I'm trying to find a way to flatten a hash of arrays, such that the order of the elements are in order of index. So 1st element of every array gets picked up, then second, then third, and so on, and if there is no element of that index then move on to the next array instead of returning nil or something.
Example 1: {a: [1, 2, 3], b: [4, 5], c: [6, 7, 8, 9]}
Result: [1, 4, 6, 2, 5, 7, 3, 8, 9]
Example 2: {i: ['A'], ii: ['B', 'C', 'D'], iii: ['E'], iv: ['F', 'G]}
Result: ['A', 'B', 'E', 'F', 'C', 'G', 'D']