json-differ
v1.0.0
Published
compare the difference between two json obj
Downloads
3
Readme
JSON DIFFER
Check diff between two JSON objects.
Installation
$ npm install json-differ
Usage
var diff = require('json-differ');
var first = {
"foo": {
"bar": "baz",
"biz": "foo"
},
"fiz": {
"foo": "baz"
},
"bar": "baz",
"baz": [
"foo",
"bar"
]
};
var second = {
"foo": {
"bar": "baz1",
"biz": "foo"
},
"fiz": {
"foo": "baz"
},
"bar": "baz",
"baz": [
"foo1"
]
};
diff(JSON.stringify(first), JSON.stringify(second));
// => {"foo":{"bar":"baz1"},"baz":["foo1"]}
Test
npm test