Hidden navigation menu item if its sub item is hidden

How do I hidden navigation menu item if its sub item is hidden?
Screenshot 2022-09-28 at 3.29.24 PM

@Kenny2 Can you share some more context or code or screenshot?

Hey @Kenny2,

Interesting use-case.

You can add this to the hide input of your menu item:

Object.values(navigation1.menuItems[1].menuItems).every(
  value => value.hidden == true
)

Be sure to change menuItems[1] with the actual index of your menuItem.

Does that work?