Hey there, I'm looking to iterate through an array containing objects with different types within a single component.
operations = [
{
"id": 15525205,
"type": "mise_en_prep",
"referenceMep": "MB0153",
"tax": 20,
"size": "M"
}
{
"id": 16525205,
"type": "invoice",
"referenceInvoice": "MB0153",
"tax": 20,
"size": "M"
}
]
<div v-for="item in operations">
<my-component
:size="item.size" // if type is mise_en_prep
:tax="item.tax" // if type is invoice
:invoice="item.referenceInvoice" // if type is invoice
</my-component>
</div>
I'm facing the challenge of wanting to loop through this array containing objects of various types within one component. Any help or suggestions are greatly appreciated!