title: Merge arrays within an array using Javascript/Vue.Js
body: <p>I have a fixed JSON array that contains 3 arrays. After the JSON has been fetched I am trying to merge them into one array. Here is what I have attempted but the Vue.JS array seems empty.</p>
  
  <p>PREVIOUS</p>
  
  <pre><code>this.items = items;
  </code></pre>
  
  <p>NEW ATTEMPT</p>
  
  <pre><code>this.items = items.concat.apply([], arrays);
  </code></pre>
  
  <p>I have put an example of the 3 page demo at the link below:</p>
  
  <p><a href="https://arraydemo.netlify.com" rel="nofollow noreferrer">https://arraydemo.netlify.com</a></p>
  
  <pre><code>&lt;body&gt;
  &lt;!-- Page List --&gt;
  &lt;div class="container text-center mt-5" id="app"&gt;
      &lt;h1 class="display-4"&gt;Vue Page Output:&lt;/h1&gt;
      &lt;!--&lt;h2&gt;{{items[0][0].page1}}&lt;/h2&gt;--&gt;
      &lt;h2&gt;{{items.page1}}&lt;/h2&gt;
  &lt;/div&gt;
  &lt;div class="container text-center mt-5"&gt;
      &lt;h3&gt;Other Pages&lt;/h3&gt;
      &lt;a href="products.html"&gt;Products&lt;/a&gt;
      &lt;a href="contactus.html"&gt;Contact Us&lt;/a&gt;
  &lt;/div&gt;
  &lt;!-- /.container --&gt;
  
  &lt;script type="text/javascript"&gt;
      const app = new Vue({
      el: '#app',
      data: {
          items: []
      },
      created: function () {
          fetch('test.json')
          .then(resp =&gt; resp.json())
          .then(items =&gt; {
              this.items = items.concat.apply([], arrays);
          })
      }
      });
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>JSON</p>
  
  <pre><code>[
      [
      {
          "page1": "Company Name"
      }
      ],
      [
      {
          "products": "Product List"
      }
      ],
      [
      {
          "contactus": "Contact Us at Acme Corp"
      }
      ]
  ]
  </code></pre>
  
  <p>DESIRED JSON OUTPUT</p>
  
  <p>JSON</p>
  
  <pre><code>[
      {
          "page1": "Company Name"
      },
      {
          "products": "Product List"
      },
      {
          "contactus": "Contact Us at Acme Corp"
      }
  ]
  </code></pre>