Hello I have a array of objects that contain array of objects. I would like to know how I can clean properties empty if my user search leather for example.
My result:
let cars = [{
name: 'Volvo',
equipments: [
{ name: 'saddleries', options: [{title: 'leather'}] },
{ name: 'wheels', options: [title: 'sliver'}] },
{ name: 'motor', options: [] }]
}];
I would like this result :
let cars = [{
name: 'Volvo',
equipments: [
{ name: 'saddleries', options: [{title: 'leather'}] },
{ name: 'wheels', options: [title: 'sliver'}] },
}];
How I can remove my data please ? thanks
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…