apoc.diff.nodes

Function APOC Core

Signature

apoc.diff.nodes(leftNode :: NODE?, rightNode :: NODE?) :: (MAP?)

Input parameters

Name Type Default

leftNode

NODE?

null

rightNode

NODE?

null

Usage Examples

The examples in this section are based on the following sample graph:

MERGE (joe:Person {name: "Joe", dateOfBirth: datetime("1981-09-02")})
MERGE (ryan:Person {name: "Ryan", twitter: "@ryguyrg"});
MATCH (joe:Person {name: "Joe"})
MATCH (ryan:Person {name: "Ryan"})
RETURN apoc.diff.nodes(joe, ryan) AS output;
Table 1. Results
output

{leftOnly: {dateOfBirth: 1981-09-02T00:00Z}, inCommon: {}, different: {name: {left: "Joe", right: "Ryan"}}, rightOnly: {twitter: "@ryguyrg"}}