New $w() API: Menu and MenuContainer

With the new Menu API and MenuContainer API , you can customize your menu items by changing their labels, links, where the item opens, and if an item displays as selected. This includes using Velo to modify site menus in real time during the visitor’s stay on your site.

Use the Menu API for the menu on your regular site and use the MenuContainer API for your mobile menu.


I would like to hide a submenu item when the user is not a member.
I didn’t find how to hide a submenu item. The Menu API documentation talks about an element, and I and dont’t know how to refer to an element in the submenu context, using menuitems array.
Thanking by advance.