Creating a table of content like shown below?

If you go into the settings for a parent category you can find this option to display subcategories