<div v-for="memberMembershipyear in memberMembershipyears">
<li v-for="membershipYear in membershipYears"
:style="membershipYear.num === memberMembershipyear.num ? 'color:green' : color:red'">
{{membershipYear.membershipType}} {{membershipYear.yr}}
</li>
</div>
My current implementation is not producing the desired results. The output consists mostly of red-colored items, with a few green ones interspersed. Additionally, there is excessive repetition in the display. I attempted to use v-once to address this issue, but it was unsuccessful.
Membership of club 2001
Membership of club 2002
Membership of club 2003
...
I am seeking a solution to display all memberships, highlighting only those that belong to the current member with a green color. All other memberships should be displayed in red.