[Vuejs]-Vue.js combining objects at certain property

0👍

use a computed property to return an object that combines athletes and activity. Something like:

computed:{
    combined(){
        return this.activities.map(a=>{
            a['athlete'] = this.activityAthleted(a.athlete_id)
            return a
        })
    }
}

Leave a comment