Recently, I started embarking on a project using Vue JS and as a newbie to the framework, I came across a certain dilemma. How can I retrieve all data with an id of 1 when I input a specific value? Below is an illustration of my data structure:
{
'A': [{
1: [{
id: 1,
name: 'John'
}],
2: [{
id: 5,
name: 'Ken'
}]
}],
'B': [{
1: {
id: 1,
name: 'Leena'
}
}],
'C': [{
1: [{
id: 1,
name: 'Jesica'
}],
2: [{
id: 18,
name: 'Mike'
}]
}]
}
The desired outcome should resemble the following, given that they share the same id value:
{
'A': [{
1: [{
id: 1,
name: 'John'
}]
}],
'B': [{
1: {
id: 1,
name: 'Leena'
}
}],
'C': [{
1: [{
id: 1,
name: 'Jesica'
}]
}]
}