title: how to convert 3d array to 2d array
body: <p>I want to convert 3d array to 2d array</p>
  <p>so I have 3d array look like this</p>
  <pre><code>[
    [
      [&quot;creative fee (example)&quot;],
      [1000]
    ],
    [
      [&quot;Item 1...&quot;, &quot;Item 2...&quot;],
      [600, 1000]
    ],
    [
      [&quot;Item 3...&quot;, &quot;Item 4...&quot;],
      [400, 600]
    ]
  ]
  </code></pre>
  <p>and want to convert to 2d array like this (expected result)</p>
  <pre><code>[
    [&quot;creative fee (example)&quot;, 1000],
    [&quot;Item 1...&quot;, 600],
    [&quot;Item 2...&quot;, 1000],
    [&quot;Item 3...&quot;, 400],
    [&quot;Item 4...&quot;, 600]
  ]
  </code></pre>
  <p>this is what I've tried but it begins too hard</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var carry = [
    [
      ["creative fee (example)"],
      [1000]
    ],
    [
      ["Item 1...", "Item 2..."],
      [600, 1000]
    ],
    [
      ["Item 3...", "Item 4..."],
      [400, 600]
    ]
  ],
  result = []
  for (var z = 0; z &lt; carry.length; z++) {
    for (var m = 0; m &lt; carry[z].length; m++) {
      for (var t = 0; t &lt; carry[z][m].length; t++) {
       // console.log(carry[z][m][t])
       result[z+t] = []
       result[z+t][m] = carry[z][m][t]
      }
    }
  }
  console.log(result)</code></pre>
  </div>
  </div>
  </p>
  <p>Anyways thank you in advance</p>