Goal: I am trying to use a variable to fill the menu items in the navigation bar, some of them have a mutual parent. I want the order of the items according to how I've listed the items programmatically.
However, in the end result you can see that Uploads preceeds the others that have a parent in their position. I was expecting the "Uploads" to appear after the parent item "General", but this is not the case.
You can pretty much reproduce the result using mapped menu items and looking at the order in which the items occur.
Hope you can help me by fixing this or hinting at some way I can make it work with the current setup.
I also provided another feature request that is related to this: Order Mapped Menu Items in case anyone's interested in what I consider to be a good solution
Currently, it appears the order is set to random which can be fun at times, but usually we just want the order in which the object is defined Sorry for the #sarcasm
I put the code snippet for the array of objects into a JS variable and then passed this as the source for a nav bar to map over and it seems to display them in chronological order (Dashboard->Uploads).
But I do not have any parent categories so that might be what I am missing to reproduce this.
Quick update: I experimented with using a separate script to reorder the menu items, but this didn't work. I did discover that once I fill in the parent, the order turns out alright.