***

title: findSection
slug: /reference/typescript/agents/pom-builder/find-section
description: Recursively search all sections and subsections for a matching title.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[pombuilder]: /docs/server-sdks/reference/typescript/agents/pom-builder

Recursively search all top-level sections and their nested subsections for one
matching the given title. Unlike `getSection()`, this also searches subsections.

## **Parameters**

<ParamField path="title" type="string" required={true} toc={true}>
  The section heading to search for.
</ParamField>

## **Returns**

`PomSection | undefined` -- The first matching section at any depth, or `undefined` if not found.

## **Example**

```typescript {7}
import { PomBuilder } from '@signalwire/sdk';

const pom = new PomBuilder();
pom.addSection('Rules', {
  subsections: [{ title: 'Tone', body: 'Be professional and warm.' }],
});
const tone = pom.findSection('Tone');
console.log(tone?.body); // "Be professional and warm."
```