I wish to display entire content of a list within array I am using within the export of the module - list all participants of an event.
I have another component that handles rendering of all events, so in this one I would just need to show data for one event.
My data:
events [
{
"id":1,
"participants": ["John Smith", "Victoria Abraham", "Anthony Manning"]
},
{
"id":2,
"participants": ["Victoria Abraham", "Lily Knox"]
},
{
"id":3,
"participants": ["Lily Knox", "Anthony Manning", "Joan Scott"]
}
]
Part of code that handles rendering of events.
<template v-for="event in events">
Participants:
<li v-for="participant in event.participants" :key="participant">{{ event.participants[participant] }}</li>
</template>
Currently this results in displaying empty bullet list for each event, but with correct number of bullets. Output of code above:
Event 1
Participants:
-
-
-
Event 2
Participants:
-
-
Event 3
Participants:
-
-
-