[Vuejs]-Displaying many to many relationship results and group them by the same id

0👍

Just create a new computed property to transform your data and use it instead, maybe something like this:

data() { 
    jsonData: [ /* ... */ ]
},
created() { /* ... */ },
computed: {
    transformedData() {
        return this.jsonData.reduce((acc, curr) => {
            const parcelId = curr.parcel_id; 
            if (Array.isArray(acc.parcelId)) {
                acc[parcelId].push(curr);
            } else {
                acc[parcelId] = [curr];
            }
            return acc;
        }, {});        
    }
}

Leave a comment