JSONPath Evaluator

Paste JSON and a JSONPath expression — see matched values instantly

JSON Input

Try a sample:

Result

Matches appear here

Enter JSON + a path, then click Evaluate

Details

JSONPath is a query language for JSON, similar to XPath for XML. This evaluator runs entirely in your browser using the jsonpath-plus library. Paste any valid JSON document, enter a JSONPath expression, and see the matching values instantly as formatted JSON. Supports the full JSONPath syntax: dot and bracket notation, wildcards, recursive descent, array slices, union operators, and filter expressions.

Examples

Extract all book authors with a wildcard

Path: $.store.book[*].author
Result: ["Nigel Rees", "Evelyn Waugh", "Herman Melville", "J. R. R. Tolkien"]

The [*] wildcard selects every element in the book array, and .author drills into each object to return all author strings.

Filter books priced under 10 with a filter expression

Path: $.store.book[?(@.price < 10)]
Result: [{"title": "Sayings of the Century", "price": 8.95}, ...]

The filter expression ?(@.price < 10) keeps only array elements whose price property is less than 10, returning matching book objects.

    About this tool

    JSONPath is a declarative query language for JSON, originally proposed by Stefan Goessner in 2007 as a counterpart to XPath for XML. It lets you pinpoint and extract one or many nodes from a deeply nested JSON structure using a compact expression syntax — you describe the shape of the data you want and the engine does the traversal.

    This evaluator is powered by the jsonpath-plus library, which implements the original spec and extends it with parent references, script expressions, and type filters. All processing happens entirely in your browser — your JSON never leaves your machine. Paste any valid JSON, enter an expression, and matched values are returned as a pretty-printed array you can copy with one click.

    JSONPath is widely used in test frameworks (Postman, Jest), infrastructure tooling (Kubernetes patches, AWS EventBridge rules), and API gateways. Learning the core operators — dot access, wildcards, recursive descent, slicing, and filter predicates — covers the vast majority of real-world query needs.

    How to use

    1. Query nested objects with dot notation

      Paste your JSON, enter a dot-notation path such as $.user.address.city, and click Evaluate. The tool returns an array of every matched value at that nesting level.

    2. Select array items with a wildcard

      Use [*] to target every element of an array — $.orders[*].id returns the id from every order. Combine with recursive descent (..) to match at any depth.

    3. Filter array elements with a predicate

      Wrap a condition in ?() to keep only matching elements. $.store.book[?(@.price < 10)] returns books priced below 10; @ refers to the current item.

    JSONPath operator reference

    Operator / syntaxDescription
    $Root of the document — every path starts here
    .key or ['key']Child access — a named property of an object
    ..Recursive descent — searches the entire subtree
    [*] or .*Wildcard — every child element or property
    [0], [-1]Array index — by position; negative counts from the end
    [1:3]Array slice — index 1 up to (not including) 3
    ?(@.price < 10)Filter — keeps elements where the predicate is true

    Frequently asked questions