# Appendices as sections in TOC using memoir class

While using the memoir class, I would like to show my appendices as: Like in the image, I want the individual appendices as sections under the common header "Appendices".

My simplified code is as follows:

\documentclass[11pt,a4paper,twoside,openright]{memoir}

\usepackage{lipsum}

\begin{document}

\tableofcontents

\chapter{First Chapter}
\lipsum[1]
\section{First Section}
\section{Second Section}

\appendixpage
\begin{appendices}
\makeatletter
\begingroup
\let\protect\l@chapter\protect\l@section
\let\protect\l@section\protect\l@subsection}
\makeatother
\chapter{First Appendix}
\chapter{Second Appendix}
\end{appendices}

\end{document}


However, I get the following:

Are there any solutions for getting the appendix format indicated before?

Thank you

EDIT: Added simplified code, added my result, eliminated other code

Have a look at section 6.2.1 Appendices in the manual (> texdoc memoir).

Don't use the appendix package as memoir covers that code (just in a slightly different manner). The macro \appendixpage macro inserts an Appendices page in the document and adds the title to the ToC. So, something like the following (untested):

    \appendixpage
\begin{appendices}
\makeatletter