# Sections Inside Sections: Recursion on Nested Data

Put a restaurant's menu online, with sections inside sections to any depth: add up one of everything, and print the menu as an outline with every section indented under the one that holds it, using one function per job that works at any depth.

![Cheat sheet: Sections Inside Sections: Recursion on Nested Data](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/b2ff2c757f5b4775948e4845fe9a32ed.webp)

- Category: Data Structures
- Level: Journeyman
- Tags: Base Case, data structures, Nested Data, Recursion (data-structures)
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/ds-recursion-nested-data-cheat-sheet
