I am being given data in an array that contains sub arrays and single elements. I do not know how many elements in the main array are sub arrays, or how many are single elements, or how many elements will be in a sub array, or where the sub arrays will be in the main array.
Is there a way I can detect the sub arrays or the single elements?
Example:
array[ [1,2,3], 4, 5]