jsontoolskit.org
JSON and JSON Schema utilities, in the browser
Say hi →

Filter a JSON Array

keep records matching a condition · no jq needed · updated 28 July 2026

Filter a JSON array using a short, readable condition — score > 5 AND active = true. Comparisons, substring and regex matching, set membership, and presence checks are all supported, with dotted paths for nested fields. No jq syntax to remember.

Paste input to start.

How to filter a JSON array by condition

  1. Paste a JSON array. An object wrapping exactly one array is unwrapped automatically.
  2. Type a condition. Start simple — score > 5 — and add clauses with AND / OR.
  3. Use dots for nested fields (user.address.city) and brackets for array positions (tags[0]).
  4. Tick Invert to keep everything that does not match — handy for finding the bad records rather than the good ones.
  5. Copy or download the matching records. The status bar shows how many of how many matched.

Expression reference

When you need more power

This language deliberately stops at readable one-liners. For aggregation, reshaping, or anything involving computed values, use jq — full jq compiled to WebAssembly. For standards-based selection, JSONPath implements RFC 9535. If your array is really a table, export to CSV and use a spreadsheet.

Privacy

Nothing is uploaded. The conversion runs in this tab using your own browser's JavaScript engine — no server sees your data, and the page keeps working with the network disconnected.

FAQ

Why did my condition match nothing?

Usually a type mismatch or a wrong path. Check the field name with List all paths, and remember that score > "5" compares as text. A malformed expression reports an error rather than silently matching nothing.

Are parentheses supported?

No. Keeping the grammar flat keeps it predictable — AND binds tighter than OR, which covers most real filters. For anything more nested, jq is the right tool.

Can I filter on array contents?

Only by position (tags[0] = "x") or by treating the array as text (tags contains "x", which matches against the JSON form). Real any/all quantifiers need jq or JSONPath.