cara menyaring array objek bersarang di javascript
arrayOfElements.map((element) => {
return {...element, subElements: element.subElements.filter((subElement) => subElement.surname === 1)}
})
Embarrassed Echidna