I'm having a little trouble with using javascript to split an array into a multi array. For instance, I have this array:
[0] => object
[0] => object
[0] => The Letter P
[1] => 5.5
[1] => object
[0] => 5
[1] => 1.1
[2] => 5
[3] => 1
[4] => 1
[2] => object
[0] => 5
[1] => 1.1.1
[2] => 1.1.1
[3] => 1.1.1
[4] => 3
What I would like to do is split up the periods, and create an even deeper array like this:
[0] => object
[0] => object
[0] => The Letter P
[1] => object
[0] => 5
[1] => 5
[1] => object
[0] => 5
[1] => object
[0] => 1
[1] => 1
[2] => 5
[3] => 1
[4] => 1
[2] => object
[0] => 5
[1] => object
[0] => 1
[1] => 1
[2] => 1
[2] => object
[0] => 1
[1] => 1
[2] => 1
[3] => object
[0] => 1
[1] => 1
[2] => 1
[4] => 3
I have tried just about everything that I can think of and I can't seem to find a code that works :( Please help me :(
if (~~x !== x)
for Number andx.indexOf('.')
for String.typeof x