Search code examples
angularjsjson-patch

Any equivalent of json-patch js for AngularJS


Any angularJS equivalent for finding the Patch from two different object.

I could find few for latest versions of angualr, but not for angularJS 1.x versions. If anyone is familiar with any of such npm packages please do answer.

I could find following in Javascript but with no AngularJs support, or is there a way I could make any of the following work in AngularJS?

  • Starcounter-Jack/JSON-Patch
  • bruth/jsonpatch-js
  • dharmafly/jsonpatch.js
  • jiff
  • RFC6902

These are the few JS examples. Any equivalent from I could generate following patch in AngularJs would be helpful:

{ "op": "replace", "path": "/baz", "value": "boo" }


Solution

  • Well I made it work by using the usual javascript reference from Starcounter-Jack/JSON-Patch. By loading it in the _layout.cshtml