{"id":19898393,"url":"https://github.com/ansteh/difference-json","last_synced_at":"2025-03-01T06:23:17.578Z","repository":{"id":76759756,"uuid":"49674496","full_name":"ansteh/difference-json","owner":"ansteh","description":"prompt the diffrence of two json objects","archived":false,"fork":false,"pushed_at":"2017-02-06T21:49:51.000Z","size":9,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-02-22T23:46:30.345Z","etag":null,"topics":["difference","json-objects"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ansteh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-14T20:53:34.000Z","updated_at":"2023-03-05T04:16:03.000Z","dependencies_parsed_at":"2023-06-29T22:01:20.374Z","dependency_job_id":null,"html_url":"https://github.com/ansteh/difference-json","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"491d4290feb8fa5785e131ca3f3bd26de43d45bc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansteh%2Fdifference-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansteh%2Fdifference-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansteh%2Fdifference-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansteh%2Fdifference-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansteh","download_url":"https://codeload.github.com/ansteh/difference-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241325823,"owners_count":19944443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["difference","json-objects"],"created_at":"2024-11-12T19:04:13.886Z","updated_at":"2025-03-01T06:23:17.561Z","avatar_url":"https://github.com/ansteh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://api.travis-ci.org/ansteh/difference-json.svg?branch=master)](https://travis-ci.org/ansteh/difference-json)\n\n\n## Install\n\nUsing npm:\n\n```js\nnpm install difference-json\n```\n\n## Usage\n\nGet the difference of arrays:\n```js\nvar diff = require('difference-json');\nvar result = diff([1,2,3],[1,6,7]);\n//result equals:\n[{\n  $set: 6,\n  $was: 2,\n  $index: 1\n}, {\n  $set: 7,\n  $was: 3,\n  $index: 2\n}]\n```\n\nGet the difference of simple json objects:\n```js\nvar diff = require('difference-json');\nvar result = diff({\n  name: 'john'\n},{\n  name: 'andre'\n});\n//result equals:\n{\n  name: {\n    $was: 'john',\n    $set: 'andre'\n  }\n}\n```\n\nGet the difference of simple nested json objects:\n```js\nvar diff = require('difference-json');\nvar result = diff({\n  role: 'customer',\n  basket: {\n    sum: 20\n  }\n},{\n  role: 'customer',\n  basket: {\n    sum: 35\n  }\n});\n//result equals:\n{\n  basket: {\n    sum: {\n      $set: 35,\n      $was: 20\n    }\n  }\n}\n```\n\n## Related\n\n- [shape-json](https://github.com/ansteh/shape-json) - Convert json to json with a predefined scheme\n- [shape-array](https://github.com/ansteh/shape-array) - Convert array to json object\n\n## License\n\nMIT © [Andre Stehle](https://github.com/ansteh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansteh%2Fdifference-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansteh%2Fdifference-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansteh%2Fdifference-json/lists"}