I have a array of objects that contain array of objects. I would like to know how I can browse it. I tried with a map but the parent data doesn't come up...
My result:
let cars = [{ name: 'Volvo', equipments:
[{
name: 'saddleries',
options:[array],
}]
}];
I would like this result :
let cars = [{ name: 'Volvo (1) equipment', equipments:
[{
name: 'saddleries (2) options',
options:
[{name: 'leather'},
{name: 'fabrics'},
}], }]
Does anyone have a solution?
question from:
https://stackoverflow.com/questions/65682294/how-do-i-rebuild-an-array-of-objects-in-an-array 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…