Check if route has parent

How to get parent of route if it exists

See matched: API Reference | Vue Router

It returns undefined. I need to generate a mutilevel navigation using router.getRoutes()