Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lukascivil committed Aug 20, 2022
1 parent 208cb5a commit 6c13a02
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ Simple usage:
import { getDiff } from 'json-difference'

const coffee = { color: { color1: 'black', color2: 'brown' }, special: true }
const oil = { color: { color1: 'red', color2: 'blue' }, special2: false }
const oil = { color: { color1: 'red', color2: 'blue' }, special2: false, especial3: [{}] }

// Get JsonDiff delta
let diff = getDiff(coffee, oil)

console.log(diff)
Expand All @@ -61,7 +62,10 @@ Output:

```json
{
"added": [["special2", false]],
"added": [
["special2", false],
["especial3/0[]", {}]
],
"removed": [["special", true]],
"edited": [
["color/color1", "black", "red"],
Expand Down

0 comments on commit 6c13a02

Please sign in to comment.