How to Filter JSON Arrays - Step by Step Guide
Input Your JSON Array
Start by providing your JSON array! Whether you're working with arrays of objects, primitive values, or need to format JSON first, you have several convenient options for filtering JSON data:
Set Up Your Filter
Once your JSON array is loaded, configure your filter options:
Example: Filter by Department = "Engineering"
Filter the array to show only items where department equals "Engineering". The tool will automatically show only matching items:
[ { "name": "Alice Johnson", "department": "Engineering", "age": 28 }, { "name": "Diana Prince", "department": "Engineering", "age": 31 } ]
Other Filter Examples:
- • Contains: Filter names containing "John"
- • Greater than: Filter age > 30
- • Starts with: Filter department starting with "Eng"
Primitive Arrays:
For arrays like ["apple", "banana", "cherry"], filter directly by value without selecting a key
View Filtered Results
The filtered array appears in the output panel, indented with two spaces. The items are copied from your input as you typed them, so long IDs and decimals like 14.50 don't change:
[] and a note saying which condition found nothing, so an empty result never looks like a bug{"users": [...]} and the array inside it is filteredExample: Filter Results Visualization
The output shows only matching items. Here's what happens when filtering by different criteria:
Filter: age > 30
Shows: "3 of 5" items
Bob (35), Charlie (42), Diana (31)
Filter: name contains "Alice"
Shows: "1 of 5" items
Alice Johnson
Export Your Filtered Array
When the result looks right, take it with you. The output is plain JSON you can use in any application or API:
Example: Common Filter Use Cases
🔍 Data Search
Find specific records in large datasets, like customers by email domain or products by category
📊 Analytics
Filter data for analysis - show only high-value transactions, active users, or recent entries
🎯 API Filtering
Filter API response arrays before displaying in your frontend to show only relevant data
📈 Reports
Create focused reports by filtering data by date ranges, status, or other criteria before export
Frequently Asked Questions
How do I filter a JSON array?
Paste the array into the input box (or upload a .json file). If it holds objects, pick the key to filter on, choose a comparison and type the value. The output only keeps the items that match, and the badge tells you how many that is, for example "3 of 5". For a plain list of strings or numbers there's no key to pick: choose the comparison and type the value.
How are numbers and text compared?
Numbers are compared by value, digit for digit, so 8901240544102066246 and 8901240544102066247 are told apart and 14.50 equals 14.5. Text comparisons ignore upper and lower case. With > and <, a number in quotes such as "9.99" is compared as an amount when you type a number, and other text is compared alphabetically. Contains, starts with and ends with look at a number the way it is written, so "contains .50" finds 14.50. Typing null finds items where the value is null or the key is missing.
Will filtering change any of my values?
No. The items you keep are copied from your input as you typed them: long IDs, 14.50 with its trailing zero, 1e21, \u escapes and even a key written twice all come through unchanged. Only the indentation is redone, with two spaces.
What if my JSON is an object with the array inside it?
If the object holds exactly one array, such as {"users": [...]}, that array is filtered and a note above the output says which key it came from. The output is the filtered array on its own. When the object holds several arrays, paste just the one you want, from its [ to its matching ].
Can I filter by more than one condition?
One condition at a time. To combine two, filter by the first, copy the result back into the input, then apply the second. For OR-style searches, "contains" on a key that holds a list or an object searches its whole JSON text.
Is my JSON uploaded anywhere?
No. The filtering runs in your browser and nothing you paste or upload is sent to a server or kept. A reload starts with an empty editor.
Next steps for a filtered array: sort it, turn it into a spreadsheet with JSON to CSV, or look at it as a table.