Diff two JSON arrays by key to detect added, removed, and modified records
Diff two JSON arrays to find added, deleted, and modified records based on a shared key.
Interactive Sample Data
| id | status | diff_type | changes |
|---|---|---|---|
| 101 | active | MODIFIED | price: 25.00 -> 30.00 |
| 102 | pending | REMOVED | record deleted in Array B |
| 103 | active | ADDED | new record in Array B |
How this tool works
Things that usually go wrong
- Keys must be unique within each array for the comparison to be meaningful — deduplicate both arrays first.
- Arrays with no matching key fields produce a 'no matches' report.
Edge cases we tested
Correctly evaluated as 0 differences because objects match on primary key.
Pinpoints the exact nested path (e.g. 'user.address.zip') that changed.
Flagged as modified with type change indicator.
Frequently Asked Questions
What does the 'changed' category show?
Records that exist in both arrays under the same key but have at least one different field value. The changed fields are listed.
Can I compare deeply nested objects?
Yes — nested fields are compared by deep equality.
Related tools
Validate CSV
Audit CSV files for structural errors, encoding problems, and row-length inconsistencies.
Open Tool →Validate JSON
Parse and validate JSON strings to expose syntax errors at exact line and column positions.
Open Tool →Find Duplicate Rows
Identify and count duplicate rows in CSV files by exact match or by key column selection.
Open Tool →