Skip to Content
ExamplesObject Comparison

Object Comparison

Learn how to use BlazeDiff for comparing JavaScript objects and detecting changes in complex data structures.

Installation

npm install @blazediff/object

Overview

BlazeDiff Object provides fast and efficient comparison of JavaScript objects, detecting additions, removals, and modifications with detailed path information. Try the interactive demos below to see different comparison scenarios in action.

{
  "a": 1,
  "b": 2,
  "c": 3
}

Old Object

{
  "a": 1,
  "b": 20,
  "d": 4
}

New Object

Result

import diff from "@blazediff/object"; const oldObj = { a: 1, b: 2, c: 3 }; const newObj = { a: 1, b: 20, d: 4 }; const changes = diff(oldObj, newObj);
Last updated on