I have an array which structure [a, [b], c, [d], ...], for example:
array = [0, [1], 2, [1]]
And I need:
[[0, 1], [2, 1]]
How do I do it? :P
Update:
I was wondering how wil handle this array
array = [0, [], 1, [], 2, []]
into
[[0, 1], [2, 1]]
That is remove the empty ones and merge as shown above accordingly.
Thanks :)