Data Quality Toolkit icon

Data Quality Toolkit

Validate, clean, compare, and score workflow data without runtime dependencies

Compare Records

AI-generated

Summary

Compare two objects extracted from specified dot paths within an input JSON item and return the list of changed fields between the two.

Inputs

  • Before Object Path — Dot path to the old/source object within the input JSON (default 'before').
  • After Object Path — Dot path to the new/target object within the input JSON (default 'after').

Output shape

a single JSON object per input item with original data plus a dataQuality property containing changed (boolean), changeCount (number), and changes (array of changed fields with before and after values).

If either specified path does not resolve to an object, the node throws an error. The changes array contains entries describing each differing field with keys: field (dot path), before (value in old object), and after (value in new object). Comparison is done by flattening nested objects and performing deep equality checks on values.

Examples

Example 1: Input item contains fields at paths 'before' and 'after' to compare

Before Object Path: 'before'; After Object Path: 'after' (defaults)

Links

Discussion