In my table it renders an array of users as rows in a table with <tr v-for="user in users" :key="user.id">
For the the column roles, instead of getting admin or user. The data is sending a 1 for admin and 2 for user. Is there a way that I can replace the array of that object? If it's 1 = admin, 2 = user
data()
{
return {
users: []
}
getUsers()
{
axios.get(url).then(response => {
this.users = response.data.report.users
})
}
<tbody>
<tr v-for="user in users" :key="user.id">
<td>{{user.firstName}} {{user.lastName}}</td>
<td>{{user.email}}</td>
<td>{{user.role}}</td>
</tr>
</tbody>
