happytails.ai

Remove duplicates from a JSON array

Keep one copy of each distinct JSON value.

Keeps the first occurrence of each structurally equal JSON value. Object key order is ignored; array order and types matter. The first object’s original key order is kept. Use double-quoted property names and valid JSON values. Results update as you type. Up to 1,000,000 characters.

Your result

Report a problem or share an idea.

How to use Remove duplicates from a JSON array
  1. Paste a JSON array. Structural equality ignores the order of object keys, but keeps number and string types distinct. The first occurrence is retained.
  2. The two objects collapse into one. The string "1" and number 1 both remain, because they have different types. Nested array order matters.

Useful next steps

How to use it

Paste a JSON array. Structural equality ignores the order of object keys, but keeps number and string types distinct. The first occurrence is retained.

Try a small example

The two objects collapse into one. The string "1" and number 1 both remain, because they have different types. Nested array order matters.

What to know

Keeps the first occurrence of each structurally equal JSON value. Object key order is ignored; array order and types matter. The first object’s original key order is kept.