JavaScript を使用して配列をマルチ配列に分割するのに少し問題があります。たとえば、次の配列があります。
[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
私がやりたいことは、期間を分割し、次のようなさらに深い配列を作成することです:
[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
考えられることはすべて試してみましたが、機能するコードが見つからないようです:(助けてください:(