I have a application where I have a small form where the user can add one date with multiple start and end times and then it is put inside an array. This process can be repeated as many times as needed.
this is how that array looks:
datesFinal: {meetingName: "", meetingPw:"", meetingUrl: "",
meetingTime: []} ,
In meetingTime date,start,endtime will be saved. one value form could be like this:
"meetingTime":[
{
"date":"2021-06-21",
"startTime":"15:30",
"endTime":"16:30"
},
{
"date":"2021-06-21",
"startTime":"15:30",
"endTime":"17:30"
},
What I want to achieve now is that my app loops through this array and looks if the date is same for the two objects in this case two times 2021.06.21 it should be displayed like this:
2021.06.21 15:30-17:30 15:30-16:30
THe times belonging to the same date should be collected under it.I tried looping though the array to first of show the complete object without any filtering as starters. But I am getting the error that it is undefined (times undefined).
Could someone look at my code and give me a pointer:
<v-col cols="12" v-for="(timesForDate, i) in datesFinal" key="i">
<h4>{{ datesFinal.meetingTime}}</h4>
<v-chip-group v-if="time.length">
<v-chip v-for="(time, j) in datesFinal.meetingTime" :key="j">{{
time.startTime + ":" + time.endTime
}}</v-chip>
</v-chip-group>
</v-col>