Array of the object

how to loop a array of the object

Read this

the description is not clear

The forEach array method loops through the array and uses the property names to operate based on each object property.

Thanks and regards..

Hello @rusirunethmina
here the example of how to loop a array of the object

<template>
  <div v-for="(product, index) in products" :key="index">
    {{ product.name }}
  </div>
</template>

<script>
import { ref } from "vue";

export default {
  setup() {
    const products = ref([
      { id: 0, name: "shirt" },
      { id: 1, name: "jacket" },
      { id: 2, name: "shoes" },
    ]);

    return {
      products,
    };
  },
};
</script>