from typing import List
from typing import Dict


def sub_menu_open(menu_entries: List[Dict[str, str]], active_route: str) -> bool:
    """
    Expose submenu method for jinja templates.

    :param menu_entries: list of menu entry
    :type menu_entries: List
    :param active_route: current active flask route
    :type active_route: str
    :return: True if route in menu_entry and is the active_route, False otherwise
    :rtype: bool
    """
    for menu_entry in menu_entries:
        if 'route' in menu_entry and menu_entry['route'] == active_route:
            return True
    return False