> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# 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));
```