I'm trying to delete duplicate keys from a nested array in vuejs
, and remove them from the DOM
<div class="container" v-for="shops in malls">
<div class="container" v-for="shop in shops.section">
<div class="detail-report-item" v-for="detail in shop.shop" :key="detail.id" :id="detail.id">
<span> {{ detail.name }} </span>
<span> {{ detail.date }} </span>
</div>
</div>
</div>
My data is gotten from a Laravel api via axios. P.S this may be a little hard to read
[
{
id: 2,
first_name: "john",
last_name: "john",
malls: [
{
id: 1,
name: "Ginger mall",
slug: "Ginger-mall",
pivot: {
user_id: 2,
mall_id: 1,
id: 1
},
shop: [
{
id: 1,
mall_id: 1,
title: "Report 1"
}
]
}
]
}
];