private function explodeChildren($id, array $childrenMap)
    {
        if (! isset($childrenMap[$id])) {
            return [];
        }

        // Indexing items by their value
        $indexed = [];

        foreach ($childrenMap[$id] as $childName) {
            $indexed[$childName] = $childName;
        }

        return array_map(
            function ($childId) use ($childrenMap) {
                return $this->explodeChildren($childId, $childrenMap);
            },
            $indexed
        );
    }