[Vuejs]-Dynamically call an object property in a v-for loop

0👍

You should use item[name] instead of item.name

<tbody>
  <tr class="userdata" v-for="(item, index) in data" :key="index">
    <td v-for="(name, nIndex) in Object.keys(data[index])" :key="nIndex">
      {{ item[name] }}
    </td>
  </tr>
</tbody>

Leave a comment