I have a multidimensional array something like this
[ [[]], [[1], [2]], [[1, 2]] ]
What’s the best way to remove the empty array?
Right now I am just doing a array[1..-1] to remove the first element but I would like a more reliable way to do it.
Flatten each array and if it has no elements in it, delete it.