I need help transferring multiple objects
from laravel
to vue
and filling my vue objects with information retrieved from the database.
This is the data received from laravel:
https://i.sstatic.net/2Hnk5.png
Vue objects to be populated:
storeName: {},
storeUrl: {},
appName: {},
price: {},
share: {},
Here's where the data will be populated:
mounted() {
axios.get('/dashboard/affiliates')
.then(res => {
let data = res.data;
this.storeName = data.affiliates.shop_name;
console.log(data.affiliates);
})
It seems like using the filter function in JavaScript would be a good approach to populate the vue objects, but I'm unsure of how to implement it. Can someone guide me on how to achieve this?
What is the best way to fill my vue objects with data so that I can later display them in a v-for loop on the view?