Hi I have an axios which it returns to an array like this one:
My axios code:
axios.post('/api/hr_employee/days/'+ this.period_data.year +'/'+ this.period_data.month +'?page='+this.currentPage+'&api_token='+App.apiToken)
.then(response => {
this.posts = response.data.data;
console.log(this.posts);
this.rowsQuantity = 1000;
})
The response:
full_name: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",…], rut: ["06152617-K", "06628494-8", "06802969-4", "06974036-7", "07066149-7", "07174172-9", "07274753-4",…], total_days: [30, 30, 30, 21, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 27, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,…]
How you can see it is a multidimensional full_name, rut, days..
<tr v-for="(row, idx1) in posts">
<td>{{ row.full_name }}</td>
<td>{{ row.rut }}</td>
<td>
<input type="number" class="form-control" id="exampleInputEmail1" v-model="row.days" placeholder="">
</td>
</tr>
I wonder how can I list like above? I tried everything and I can not be able to do it
Thanks!