I am trying to get a hierarchy diagram like this using the Forest package
But, could not managed to get so. I used this code
\documentclass[border=20pt,tikz]{standalone}
\usepackage[edges]{forest}
\forestset{
direction switch/.style={
for tree={edge+=thick, font=\sffamily},
where level>=1{folder, grow'=0}{for children=forked edge},
where level=3{}{draw},
},
}
\begin{document}
\begin{forest}
% forest preamble: determine layout and format of tree
direction switch
[Main
[1.1]
[1.2]
[1.3]
[1.4]
[2
[2.1]
[2.2]
]
[3
[3.1]
[3.2]
]
[4
[4.1]
[4.2]
]
]
\end{forest}
\end{document}
Thanks in advance for your help.