I'm trying to use v-for to loop through an array of objects, with each object containing a key/value pair.
Example: [{rel_date: '1 hour ago', source: 'slack'}, {rel_date: '2 hours ago', source: 'gmail'}, {rel_date: '3 hours ago', source: 'microsoft'}, {rel_date: '4 hours ago', source: 'slack'}]
in my vue template, I'm using v-for loop and a v-if inside the loop to check that (source = 'slack'), but I'm noticing it's rendering this twice since it shows up twice in the array. Is there a way for me to only show the iteration of (source: 'slack') only once?
This is my template code
<div class="col-12 text-left" v-for="last_activity in team_member.activity">
<span v-if="last_activity.source == 'slack'">
<span class="label label-slack">[[ last_activity.source ]]</span>
</span>
</div>