## 13.1. Diff

This section describes a function that displays the difference between two nodes.

Diff is a user function to return a detailed diff between two nodes.

`apoc.diff.nodes([leftNode],[rightNode])`

Example.

    CREATE
        (n:Person{name:'Steve',age:34, eyes:'blue'}),
        (m:Person{name:'Jake',hair:'brown',age:34})
    WITH n,m
    return apoc.diff.nodes(n,m)

Resulting JSON body:

    {
      "leftOnly": {
        "eyes": "blue"
      },
      "inCommon": {
        "age": 34
      },
      "different": {
        "name": {
          "left": "Steve",
          "right": "Jake"
        }
      },
      "rightOnly": {
        "hair": "brown"
      }
    }