I am attempting to create a dynamic table using the following objects:
<tr v-for="product in allPosts" :key="product.id">
<td v-for='(item, i) in checked' :key='`item${i}`'>{{product.item}}</td>
</tr>
In this scenario, I want to iterate through "product" from the first v-for loop and "item" from the second. I am trying to make it dynamic but unfortunately, it just results in an empty table. The array "allPosts" contains a large number of objects with data while "checked" holds an array of user-selected data. The elements in "item" correspond to keys in "product". Is it possible to achieve this dynamically?
AllPosts object (and 999 more lines like this):
[{"id":1,"post":"data","views":991,"comments":16,"likes":71}]
Checked array:
["post", "views", "comments", "likes"]