[Vuejs]-How to display value of objects in vue.js 2?

0👍

The list is an object, with the keys being the different element id’s – you are currently trying to access like this:

this.$store.state.product.list.id.name

You are getting that error because there is no id key in the list object, you need to replace .id with the actual id value, like this:

this.$store.state.product.list["12"].name; //"Bunga Gandeng"

Leave a comment