To get that kind of control you will probably need to create a custom Walker. Take a look at the defaults for wp_nav_menu()
$defaults = array(
'theme_location' => '',
'menu' => '',
'container' => 'div',
'container_class' => '',
'container_id' => '',
'menu_class' => 'menu',
'menu_id' => '',
'echo' => true,
'fallback_cb' => 'wp_page_menu',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
'depth' => 0,
'walker' => ''
);
You are going to need to create a new Walker and load it with the 'walker' => ''
argument. There is an example toward the middle of the page, and numerous Q/As here if you search.
Since it looks like you are hacking a theme, I’d suggest creating a child theme, and altering the Walker via the wp_nav_menu_args
filter.
$args = apply_filters( 'wp_nav_menu_args', $args );