title: How to populate an array in Vue with data from Axios request
body: <p>v-breadcrumbs displays data from the breadcrumbs array - this works fine with static data. </p>
  
  <pre><code>&lt;v-row&gt;
      &lt;!-- Breadcrumbs --&gt;
      &lt;v-col class="d-flex"&gt;
          &lt;v-breadcrumbs :items="breadcrumbs"&gt;&lt;/v-breadcrumbs&gt;
      &lt;/v-col&gt;
  &lt;/v-row&gt;
  
  &lt;v-row&gt;
      &lt;v-col class="d-flex"&gt;
          &lt;p class="blue--text title font-weight-medium my-0"&gt;{{response.products.title}}&lt;/p&gt;
      &lt;/v-col&gt;
  &lt;/v-row&gt;
  </code></pre>
  
  <p>Axios makes a get request to get various data about a product - this also works fine.</p>
  
  <pre><code>&lt;script&gt;
  export default {
    async asyncData({$axios, params}){
      try{
        let response = await $axios.$get(`/api/products/${params.id}`)
        console.log(responce);
  
        return{
          responce: responce
        }
      }catch(err){
        console.log(err);
      }
    },
    data: () =&gt; ({
      breadcrumbs: [{text: "Category", href: "index"}, {text: "", disabled: true}]
    })
  &lt;/script&gt;
  </code></pre>
  
  <p>I would then like to use the data returned from the get request to propagate the last item in the breadcrumb array. </p>
  
  <p>I tried using a promise to insert the value after the get request has complete but in doing so the whole app crashes with <strong>" Cannot read property 'products' of undefined "</strong> regardless of what code is executed in the promise.</p>
  
  <pre><code>let response = await $axios.$get(`/api/products/${params.id}`)
                       .then((result) =&gt; {
                         // Some code here
                       })
  </code></pre>
  
  <p>I realise I must be altering the 'response' value somehow in using the .then() promise. Is this the best way to solve this problem or should I be looking into Vue lifecycle hooks?</p>
  
  <p>Here is the API response to the get request:</p>
  
  <pre><code>{
    success: true,
    products: {
      rating: [],
      _id: '5e3bfd038125ebafba2ff8ce',
      owner: {
        _id: '5e397eed2da03d0817f3f870',
        name: 'Jeff Bezos',
        about: 'Jeff is the owner of this site.',
        photo: '-',
        __v: 0
      },
      category: { _id: '5e397bcc2da03d0817f3f86d', type: 'Books', __v: 0 },
      title: 'The Everything Store',
      description: 'A book about Amazon',
      photo: '-',
      price: 12,
      stockQuantity: 73,
      __v: 0
    }
  }
  </code></pre>