generating sub menus by the json file