In one of the wordpress theme development project I came across a scenario in which I want to get the URL bye name of the menu object. Here is the code sniper and how I did it.
<?php
$url = '';
$name = '';
$home_menu = wp_get_nav_menu_object( 'Home' );
if ( $home_menu ) { // If the menu exists, get its items.
$menu_items = wp_get_nav_menu_items( $home_menu->term_id, array( 'update_post_term_cache' => false ) );
if( 1 == count($menu_items) ) {
$url = $menu_items[0]->url;
$name = $menu_items[0]->title;
}
}
?>
<a href="<?php echo esc_url( $url ) ?>"><?php echo $name ?></a>
Read the api doc for more details