title: How to display value of objects in vue.js 2?
body: <p>My code is like this :</p>
  
  <pre><code>&lt;script&gt;
      export default {
          props:['search','category','shop'],
          created(){
              ...
          },
          data(){
              return{
                  loading:false
              }
          },
          computed:{
              ...
              list:function(){
                  console.log(this.$store.state.product);
                  return this.$store.state.product.list
              },
          },
          methods:{
              ...
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>I do : <code>console.log(this.$store.state.product);</code> in list method</p>
  
  <p>Then, I check it on the console</p>
  
  <p>The result is like this :</p>
  
  <p><a href="https://i.stack.imgur.com/FWM4x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FWM4x.png" alt="enter image description here"></a></p>
  
  <p>I want display value of name</p>
  
  <p>I try like this : </p>
  
  <p><code>console.log(this.$store.state.product.list.id.name);</code></p>
  
  <p>There exist error :</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'name' of undefined</p>
  </blockquote>
  
  <p>How can I solve the error?</p>