Skip to content

Tag: nested-object

transfer flat object to nested object (javascript)

i am getting a flat object of cms navigation and want to transfer it to a nested object. The level describes the position of the element in the tree. Whenever there are subelements they should be stored under a new subCategory. In every level could be multiple elements. For example two level 1 categories (“shop service” and “information”). The flat