I'm receiving data with axios like this:
getData() {
Axios.get(
'/vue/get-data/',
{
params: {
categories: this.category,
activeFilters: this.activeFilters,
}
}
).then((response) => {
this.banners = response.data;
this.setBanner();
})
},
Then I get this:
When I try console.log(response.data.length)
I get undefined
. What could
be going on here very weird!
When I look in my vue-devtools
banners has 2 objects:
So how can response.data.length
be undefined?