import { ... } from "@langchain/core/utils/json_patch";Apply a full JSON Patch array on a JSON document.
Returns the {newDocument, result} of the patch.
It modifies the document object and patch - it gets the values by reference.
If you would like to avoid touching your values, clone them:
jsonpatch.applyPatch(document, jsonpatch._deepClone(patch)).
Create an array of patches from the differences in two objects