Logo JSON Parser Online

Filter JSON Arrays by Key Value

Paste a JSON array, enter a key name and a value to match, and click Filter. The tool returns all array items where that key equals the specified value. The status bar shows how many items matched. Useful for quickly finding records that meet a specific condition without writing code.

All JSON Tools

28 tools

Free, fast, runs in your browser. No login needed.

Made with ❤️ in India · © 2025 parsejsononline.com
INPUT
1
OUTPUT
1
✅ Ready
Characters: 0
Ctrl+Enter to run
What is this tool?

How to use

  1. Paste your JSON array into the INPUT pane.
  2. Enter the key name in the Key field (e.g., status).
  3. Enter the value to match in the Value field (e.g., active).
  4. Click Filter. The output shows matching items and the count.

How it works

The filter scans every object in your array and returns the ones where the specified key equals the specified value. The comparison is loose equality (==), which means:

  • Entering true or false in the value field automatically matches boolean values — not the string "true".
  • Numeric strings like 42 match the number 42 in your data.
  • For strict string matching, surround your value with quotes — e.g., enter "42" to match the string "42".

Top-level keys only. The filter checks the top-level properties of each array item. It does not search inside nested objects. To filter on a nested value, flatten the array first with the Flatten JSON tool, then filter on the dot-notation key.

Auto-detection. If your input is a JSON object containing an array (e.g., {"users": [...]}), the tool finds and uses that array automatically — the same behavior as the JSON to CSV converter.

Status bar. After filtering, the status bar shows the number of matched items. If 0 items matched, either the key name is wrong, the value does not match, or the data type differs (string vs. number).

FAQ

Does this support filtering on nested keys?

No. The filter checks top-level keys only — e.g., if your objects have {"address": {"city": "London"}}, you cannot filter directly on address.city. Use the Flatten JSON tool first to convert nested keys to dot notation, then filter.

How do I match boolean values?

Enter true or false in the Value field (without quotes). The tool automatically converts the string "true" and "false" to actual booleans before comparing.

Can I filter with multiple conditions?

No. The filter supports a single key-value match. For multi-condition filtering, run the filter twice using the output of the first filter as input to the second.

What if no items match?

The output is an empty array []. The status bar shows "0 items matched." Check that the key name is spelled correctly and the value type matches — for example, numeric keys require a number value, not a quoted string.

Is my data sent anywhere?

No. Filtering runs entirely in your browser.

Related tools

JSONPath TesterExtract values using path expressions and JS property access. Flatten JSONFlatten nested objects before filtering on deep keys. JSON to CSVConvert filtered results to a spreadsheet.