getTestimonials() {
axios.get('/api/testimonials?page='+this.pagination.current_page)
.then(res => {
var response = res.data;
this.testimonials = response;
console.log(Res. data.data);
console.log(response.data);
console.log(this.testimonials.data);
this.testimonials.data = [];
console.log(Res. data.data);
console.log(response.data);
console.log(this.testimonials.data);
... in the next code i want to use res.data.data but one is emprty
})
.catch((error) => console.log(error));
},
Can I reset an array of testimonials.data and use res.data.data next?
this.testimonials.data = [];
Find more questions by tags Vue.js
- Kameron_Hilpert34 commented on June 8th 19 at 17:09
Now use slice - cesar65 commented on June 8th 19 at 17:12