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

# Function: fromOps()

```ts
function fromOps(ops: MediaOp[]): MediaPlan;
```

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

Build a [MediaPlan](../interfaces/MediaPlan.md) from a JSON ops array. The inverse of [toOps](toOps.md).

## Parameters

| Parameter | Type                                    | Description    |
| --------- | --------------------------------------- | -------------- |
| `ops`     | [`MediaOp`](../interfaces/MediaOp.md)\[] | The ops array. |

## Returns

[`MediaPlan`](../interfaces/MediaPlan.md)

The equivalent plan.

## Remarks

Performs structural normalization only (verb-id folding via the caller's verb table happens
in validation, not here). Steps carry no spans.
