---
url: 'https://adk.nht.io/api/@nhtio/adk/batteries/media/functions/toOps.md'
---

# Function: toOps()

```ts
function toOps(plan: MediaPlan): MediaOp[];
```

Defined in: [src/batteries/media/plan.ts:265](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/plan.ts#L265)

Render a [MediaPlan](../interfaces/MediaPlan.md) to its JSON ops array. Total — every plan has an ops form.

## Parameters

| Parameter | Type                                      | Description         |
| --------- | ----------------------------------------- | ------------------- |
| `plan`    | [`MediaPlan`](../interfaces/MediaPlan.md) | The plan to render. |

## Returns

[`MediaOp`](../interfaces/MediaOp.md)\[]

The ops array (spans stripped).
