I have the following array of objects below. I need to list in a v-for
only the records where the variable parent
is equal to 4
, and I'm not getting it.
Code:
this.full_category_list = [
{
id: 1,
name: 'Sólido',
parent : 0,
},
{
id: 2,
name: 'Líquido',
parent : 0
},
{
id: 3,
name: 'Madeira',
parent : 1
},
{
id: 4,
name: 'Ferro',
parent : 1
},
{
id: 5,
name: 'Chapas',
parent : 4
},
{
id: 6,
name: 'Tubos',
parent : 4
},
{
id: 7,
name: 'Vigas',
parent : 4
},
];