[
{
guid: "aaa-111",
items: [
{
id: 1,
checked: false
},
{
id: 2,
checked: true
}
]
},
{
guid: "bbb-222",
items: [
{
id: 2,
checked: true
},
{
id: 3,
checked: true
}
]
}
]
[
{
guid: "aaa-111",
items: [
{
id:2
}
]
},
{
guid: "bbb-222",
items: [
{
id: 2
},
{
id: 3
}
]
}
]
arr.map(n => ({
...n,
items: n.items.filter(m => m.checked).map(m => ({ ...m })),
}))
возможно, computed надо высчитывать?
computed: {
checkedArr() {
return this.arr.map(/* ... */);
},
},