Skip to JSON editor / 跳到编辑器
使用指南 / Guide+

Query JSON paths and filter records

Use paths to extract values and conditions to select matching records. The two query modes solve different tasks.

Use the tool ↓

How to use this tool

Extract values with paths

For [{"total":20},{"total":5}], the path $[*].total returns 20 and 5. Use $.customer.name for a nested object, items[0].qty for a specific index, or $..id to find id fields recursively. The supported path syntax is a subset, not a full JSONPath implementation.

Filter with expressions

For the same array, total >= 10 selects the first record. contains(name, "Prism") checks text; exists(name) checks presence. any(items, item => item.qty >= 2) matches a record with at least one qualifying item. Combine conditions with && or ||.

Choose the right root

Path queries start at the entire document, so root arrays use $[*]. Expressions on a root array run against each record, without that prefix. The visual builder helps select fields. Generated examples use your current data; exports include full records by default, with an option to include only selected fields.

Input and output example

Run this path to extract both totals. In expression mode, total >= 10 instead filters the first record.

Input

[{"total":20},{"total":5}]

$[*].total

Output

[20, 5]
All toolsJSON formatter and minifierJSON syntax validatorQuery JSON paths and filter recordsJSON Lines viewer and converter

No sign-up required. JSON content is processed locally.

Prism
All toolsJSON formatter and minifierJSON syntax validatorQuery JSON paths and filter recordsJSON Lines viewer and converter
English简体中文