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

# findSection

> Recursively search all sections and subsections for a matching title.

[ref-section]: /docs/server-sdks/reference/typescript/agents/pom-object-model/section

Recursively search all top-level sections and their nested subsections for one
matching the given title.

## **Parameters**

The section heading to search for.

## **Returns**

[`Section`][ref-section]` | null` -- The first matching section at any depth, or
`null` if not found.

## **Example**

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

const pom = new PromptObjectModel();
const rules = pom.addSection('Rules', { body: 'Follow these.' });
rules.addSubsection('Tone', { body: 'Be professional and warm.' });

const tone = pom.findSection('Tone');
console.log(tone?.body); // "Be professional and warm."
```