how does js fetch the json array of children with the same subscript according to the parent array subscript? Delete the picture description for different subscript
for example, if my parent array is 0, then take the array with subscript 0 in msg, and delete the array with subscript 1.
if the parent array is 1, take the array with msg subscript 1, delete the array with subscript 0, and so on
<template>
<div class="hello">
<button @click="Btn()"></button>
</div>
< / template >
< script >
export default {
name: "HelloWorld",
data() {
return {
dataBox:[{
name:"",
msg:[
["0","0"],
["1","1"],
]
},
{
name:"",
msg:[
["0","0"],
["1","1"],
]
},
{
name:"",
msg:[
["0","0"],
["1","1"],
]
},
{
name:"",
msg:[
["0","0"],
["1","1"],
]
}],
list:[],
}
},
mounted(){
this.list.push(this.dataBox)
},
methods: {
Btn(){
for(let i=0;i<this.list.length;iPP){
//
}
}
}
}