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

# toDict

> Convert the model to an array of section data objects.

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

Convert the entire model to an array of plain `SectionData` objects. Useful for
serializing the POM for storage or passing to other components.

## **Parameters**

None.

## **Returns**

`SectionData[]` -- Serialized section list. See the
[`PromptObjectModel`][ref-pom] overview for the `SectionData` shape.

## **Example**

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

const pom = new PromptObjectModel();
pom.addSection('Role', { body: 'You are a helpful assistant.' });

const data = pom.toDict();
console.log(JSON.stringify(data, null, 2));
```