const Menu = [ // { header: 'Apps' }, { title: 'Teachers', // group: '', name: 'teachers', icon: 'group', }, { title: 'Students', // group: 'apps', name: 'Students', icon: 'school', }, ]; // reorder menu Menu.forEach((item) => { if (item.items) { item.items.sort((x, y) => { let textA = x.title.toUpperCase(); let textB = y.title.toUpperCase(); return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; }); } }); export default Menu;