I want to get the object with the first next date from an array in Nuxt.js.
I'm showing the object manually with the method below in the computed section:
showObject(){
const myData = Object.keys(this.fixtures).map(key => this.fixtures[key]);
return myData.find(x => x.teams.home.uid === this.teamID && x._dt.date === '04/06/2020');
}
This means I have to keep changing the date.
I want to check the objects in the array and see which object is the next one to get.
Tried with @nuxtjs/moment but I failed.
How can I solve this?