I am struggling to display pairs of data from an object based on category using nested v-for loops. The object, categoryArray, contains entries such as {stage 1, red}, {stage 1, blue}, {stage 2, orange}, {stage 3, brown}, {stage 2, green.
My desired display is: Stage 1: red, blue Stage 2: orange Stage 3: brown
Although I haven't been able to create workable code yet, my approach has been to extract unique stages and then iterate through the items within each stage.
To get the unique stages:
An additional challenge arises when trying to display all matching colors within each unique stage, as shown in the incomplete template and script above.
I feel like I'm almost there but struggling with obtaining unique stages. More insights can be found here.