I have a nested route object.
Any MAY route contains a list of childRoutes routes.
I want to get a list of all routes containing the menu key.
const routes = [{ "name": "userManagement", "childRoutes": [ { "name": "blogManagement", "childRoutes": [ { "name": "blog",
The above snippet does not work recursively.
How can I do this recursively without any third-party library?
source share