My axios request looks like this:
retrieveData() {
Axios.get(
'/vue/get-data/',
{
params: {
categories: this.category,
activeFilters: this.activeFilters,
}
}
).then((result) => {
this.banners = result.data;
this.setBanner();
})
},
After making the request, I receive the following:
https://i.sstatic.net/tTQ3W.png
However, when I attempt to
console.log(response.data.length)
, I am getting undefined
. This issue is quite puzzling!
Upon inspecting the 'banners' object in my vue-devtools
, I can see that it contains 2 objects:
https://i.sstatic.net/Qg0Yr.png
So why is response.data.length
showing up as undefined?