Bug Days
Developer guide

Compare JSON Arrays by ID, Ignore Fields, and Export JSON Patch

Compare reordered JSON API records by a unique ID, ignore timestamps and request IDs, preserve exact numeric values, and share a runnable two-change example.

6 minute read JSON array matching and filtered comparisons
Reordered JSON records matched by ID, revealing a status change and exact large-number change while ignoring a timestamp

Two API responses contain the same orders, but the records have moved, every timestamp has changed, and one status is different. Comparing array indexes makes the actual change harder to see. Match each record by a unique field instead, then ignore only the volatile fields you have deliberately excluded from the review.

Try a two-change JSON array comparison

Compare the example by ID ↗

This synthetic link opens JSON Diff with Array identity field set to id and ignored field updatedAt. The result has exactly two modifications: ORD-42 changes status from queued to paid, and its total changes from 9007199254740993 to 9007199254740994. Moving ORD-43 and changing the timestamp do not add noise.

Original

{"items":[{"id":"ORD-42","status":"queued","total":9007199254740993},{"id":"ORD-43","status":"paid","total":12.50}],"updatedAt":"2026-10-06"}

Modified

{"items":[{"id":"ORD-43","status":"paid","total":12.50},{"id":"ORD-42","status":"paid","total":9007199254740994}],"updatedAt":"2026-10-07"}

The total is intentionally an unusually large number to demonstrate precision; it is not advice to encode money this way. The comparison and copied values preserve every digit.

Choose positional, unordered, or ID-based array matching

  • Positional: the default. Index 0 compares with index 0. Use it for ordered events, coordinates, and rankings.
  • Ignore array order: match equal whole items in any position. Duplicate counts matter. A changed object appears as a removal and an addition.
  • Array identity field: pair objects by id, sku, or another top-level field and compare their properties. Reordering alone is not a difference.

The identity setting applies to every object array, including nested arrays. Each record needs a unique string, number, or boolean value for that field. Missing IDs, duplicate IDs, or arrays mixing records with primitive values produce an error, not a guessed pairing. Primitive arrays continue to use the ordering checkbox. For mixed schemas with different identity fields, compare the relevant array separately.

After matching reordered records, the selected-change panel displays both source and destination JSON Pointers. The old status may be at /items/0/status while its replacement is at /items/1/status. Jump to original and Jump to modified go to the appropriate location.

Ignore timestamps or request IDs without editing the payload

Enter one rule per line; bare field names can also be comma-separated. A field name such as updatedAt applies to every object at every depth. An exact JSON Pointer such as /meta/requestId targets only that location. Put each pointer on its own line, so commas within property names remain literal.

updatedAt
/meta/requestId

Pointer escaping follows RFC 6901: a slash in a field name becomes ~1 and a tilde becomes ~0. For example, /meta/a~1b identifies the field a/b inside meta. No wildcards or regular expressions are supported. Use an exact pointer for a field name containing a comma or leading slash. Pointers refer to the original indexes in each input, before ID pairing.

A filtered “No differences” result means the values match with your rules. It is not proof that the complete responses match. Ignored fields stay in the previews, report values, and shared inputs: ignoring a password field does not redact it. Remove private values before sharing.

Preserve large integers and small decimal differences

A comparison that first converts every number to a JavaScript Number can hide changes. Bug Days compares exact decimal values without that conversion. 1, 1.0, and 1e0 are equivalent, but 1.0000000000000001 differs from 1. Reports, copied values, and highlighted previews retain source numeric tokens.

Duplicate object keys are different from duplicate array items. An object containing two status members is ambiguous and cannot be compared here. Inspect it in the lossless JSON formatter and resolve the producer’s duplicate key first. The JSON precision guide demonstrates why ordinary parsing can lose this evidence.

Download a report or generate a JSON Patch

Download report preserves all changes, their paths, exact old and new JSON values, and the settings. Filtering the on-screen path list does not filter the export. Anyone reading large numbers from that file should use a parser capable of preserving their precision.

To generate an RFC 6902 JSON Patch, clear the identity field and ignored fields, leave Ignore array order off, and keep Ignore key order on. Download JSON Patch then emits add, remove, and replace operations in a safe application order, including descending removals from array tails.

Patch export is intentionally disabled for filtered or unordered comparisons: those settings do not describe a transformation of the whole document. The patch describes semantic values, not exact whitespace or number spelling. Review it before applying it to an API; the tool does not send a PATCH request.

Share a reproducible comparison, not a screenshot

Select Share comparison or Share result to include both documents and all comparison settings. A teammate can reopen the result and inspect the old and new values. Embedded links carry the example in a URL fragment; optional short links explicitly store it for 30 days. Anyone with either link can read the data. Comparing itself happens locally without uploading the inputs.

For large captures, use up to 10 MiB per file. Comparison runs in a local worker with Cancel, with a 128-level nesting limit and at most 5,000 changes. Large previews are bounded, but every reported change has exact value copy and a jump into the full input. Exceeding a limit shows an error rather than presenting a partial result as complete.

Continue reading