I have the following data structure:
Code: Select all
data(){
return{
teams:[
{
attr0:'hello',
attr1:'world',
attr2:[
{name:'Barry', id:1},
{name:'Larry', id:2},
{name:'Bob', id:3}
]
},
{
attr0:'goodbye',
attr1:'pluto',
attr2:[
{name:'Jake', id:4},
{name:'Tim', id:5},
{name:'Dave', id:6}
]
}
]
}
}
Code: Select all
<DataTable :value="teams">
<Column field="attr0">
<Column field="attr1">
<Column field="attr2"> <-- THIS IS THE ONE I AM TALKING ABOUT -->
</DataTable>
Ideally I am looking for the output: "Barry, Larry, Bob" but would also be fine with ['Barry', 'Larry', 'Bob'].
Is it possible to modify the column values for display?
This will be updated via a modal which contains a MultiSelect element in another part of the application, so the array of objects structure needs to stay.