I am trying to display an element specifically for the cat with the most kittens, which in this scenario would be Bob:
{
"cats": [
{"name": "Tom",
"kittens": [
{"name": "Dan"}
]
}
{
"name": "Bob",
"kittens": [
{"name": "Lil"},
{"name": "Sue"},
{"name": "Alf"}
]
}
}
Ultimately, I want it to look something like this:
<li v-for="cat in cats" :key="cat.name">
{{ cat.name }}
<span v-if="cat.kittens.length === biggestNumber">Top parent</span>
</li>
Any tips on how to retrieve, compare and utilize the highest length of the kittens
array?