The document to patch
The patch to apply
OptionalvalidateOperation: boolean | Validator<T>false is without validation, true to use default jsonpatch's validation, or you can pass a validateOperation callback to be used for validation.
Whether to mutate the original document or clone it before applying
Whether to ban modifications to __proto__, defaults to true.
An array of {newDocument, result} after the patch
Apply a full JSON Patch array on a JSON document. Returns the {newDocument, result} of the patch. It modifies the
documentobject andpatch- it gets the values by reference. If you would like to avoid touching your values, clone them:jsonpatch.applyPatch(document, jsonpatch._deepClone(patch)).