0👍
✅
Why you are trying to console.log this.merchants
in computed property. Check for computed property of vuejs here.
Your data is empty before data from API call even come. So that’s why your this.merchants
is empty.
You can get you this.merchants
value by using a method and run it after your api call or watching that like this:
watch: {
merchants: function () {
console.log(this.merchants)
}
}
It will console this.merchants
array everytime a change happens in it.
Source:stackexchange.com