How to show only one button per every distinct date ?
can i use two v-for loops ? how to select distinct values in my loop?
<div v-for="question in allQuestions" >
<button v-for="date in question.date">
{{date}}
</button>
</div>
Data model :
allQuestions : []
question : {'id' : '123' , 'date' : '25'}
allQuestions : [ question : {'id' : '123' , [{'date' : '25'},{'date' : '25'},{'date' : '27'}]}, ]<button v-for="date in question.date"> {{date.id}} </button>allQuestionsarray have nothing in it. put yourquestionobject inside yourallQuestionarray.