Imagine having an array of objects within your Vue state like the following:
[
{name: "Daniel", default: false},
{name: "Ross", default: true},
{name: "Rachel", default: false},
{name: "Joey", default: false}
{name: "Monica", default: true}
{name: "Gunther", default: true}
]
All these names are already displayed in a list on your webpage. Now, what you want to achieve is as follows:
- Daniel
- Ross - Default 1
- Rachel
- Joey
- Monica - Default 2
- Gunther - Default 3
It's clear from the example above that this is the desired outcome. What is the most straightforward way to accomplish this in Vue?