Javascript – Restructuring array with nested objects based on Id and ParentId. Removing empty based on property
I have a flat array that i nest together based on childrens parentFolderId. I need to remove items where none of the children, or children's children below it contains the property in_shop My example data looks like this: const menuItems…