the data given by the backend is as follows:
data:[
{
id:1,
name:"",
checked:true,
children:[
{
id:11,
name:"",
checked:true
},
{
id:12,
name:"",
checked:true
}
]
},
{
id:2,
name:"",
checked:false,
}
]
Q:
how to use vue to iterate through an array to determine whether checked is true, or not. If it is true, print the corresponding id.
as printed above, the result is: [1mem11jue 12]