## applyPatch() function

Apply a 'application/json-patch+json'-type patch to an object.

`patch` *must* be an array of operations.

Operation objects MUST have exactly one "op" member, whose value indicates the operation to perform. Its value MUST be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors.

This method mutates the target object in-place.

**Signature:**

```typescript
export declare function applyPatch(object: any, patch: Operation[], options?: PatchOptions): (null | MissingError | InvalidOperationError | TestError)[];
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| object | any | The object to apply the patch to |
| patch | [Operation](/content/docs/sdk/core.operation) | Array of operations to apply |
| options | [PatchOptions](/content/docs/sdk/core.patchoptions) | _(Optional)_ Optional customization of patch application behavior |

**Returns:**

(null | [MissingError](/content/docs/sdk/core.missingerror) | [InvalidOperationError](/content/docs/sdk/core.invalidoperationerror) | [TestError](/content/docs/sdk/core.testerror))[]

list of results, one for each operation: `null` indicated success, otherwise, the result will be an instance of one of the Error classes.

- [applyPatch() function](/content/docs/sdk/core.applypatch#applypatch-function/index.html)
- [Parameters](/content/docs/sdk/core.applypatch#parameters/index.html)
