Neatbo.

Nested existence filters keep the outer item

Choose outer records with a nested existence test and preserve every ordered match, repeated selection and original JSON value.

Nested existence filters keep the outer item

A recursive query selecting identifiers returns identifier objects. If the desired result is the complete enclosing record, test the nested filtered list for existence while filtering the outer list. The source answer and author comment confirm the inner-object result; the outer-item query is a separate tested correction.

Try the complete workflow

Correct query grammar or reduce output/parse work. Do not substitute a non-singular wildcard query into a comparison; use an existence filter for the nested array.

  • Decide whether the recipient needs an identifier or its complete enclosing record.
  • For the enclosing record, filter the outer list using the nested existence expression.
  • Inspect the matched paths and complete values before handing off the array.
  • Retain repeated selections and a complete empty array when no record matches.

Keep the record at the level you need

The original wildcard comparison is non-singular and is refused. The source answer selects matching inner identifier objects. The separate expression below filters each outer record by whether its identifiers filter has any result; it preserves the complete enclosing record.

Choose the level of the returned value
Query approachResult or refusal
Select matching identifier objectsReturns inner identifier objects
Filter outer records by nested existenceReturns the complete enclosing records
Compare a non-singular wildcard query as one valueRefused rather than silently choosing an element
A nested existence query
$[[email protected][[email protected] == "foo"]]

Repeated matches and original tokens carry information

A query can intentionally select the same node twice. The result is an ordered list, not a set, so duplicate paths stay duplicated. matches.json slices the original value text; spellings such as 1.00, exponent notation and internal whitespace survive when their exact mathematical values fit the integral profile.

A no-match result is a complete empty array. A refused input or exceeded work limit is a different outcome and does not publish a partial matching list.

References

  • Nested JSONPath selection question and author feedback

    The complete document is retained. The original non-singular comparison is refused; this separate nested-existence query returns the complete first outer record, unlike the answer’s inner-identifier selection.

  • RFC 9535 JSONPath

    Background specification; this fixed profile excludes functions and uses exact safe integral numeric values.

Tools in this category

Expand a tool to see its steps, options and supported formats, then open its workspace.

Query local JSON with JSONPathFilter nested JSON with a fixed RFC 9535 profile and export complete matched values with original locations.

Filter nested JSON with a fixed RFC 9535 profile and export complete matched values with original locations.

Steps

  1. Provide the local JSON and the query separately.
  2. Choose the active source mode for each role. File selection shows metadata only; click Run to read and process.
  3. For a nested identifiers array, filter the outer item using an existence test on its nested filter.
  4. Inspect all matched locations, then copy or download the complete value array and query report.

Capabilities and limits

  • One JSON document up to 1 MiB, 50,000 value nodes and depth 64. Query up to 4,096 UTF-8 bytes, 128 root segments and 32 cumulative parser calls. Cumulative retained source JSON Pointer paths allow 8 MiB; object/array reads, membership and key/descriptor visits allow 100,000 operations, including eager nested-filter lists.
  • Supports members, indices, slices, wildcards, descendants, nested existence filters and basic logical/comparison operators. Function calls and JavaScript expressions are refused. All numeric document and query literals must have exact safe integral values.
  • At most 10,000 matches; duplicate selections stay duplicated and ordered. query-report.json and matches.json together allow 8 MiB. No-match produces an empty array.
  • Matched valueJSON retains its original JSON spelling and whitespace. Paths include RFC normalized locations and JSON Pointer. The user’s original query is retained without reformatting.
  • The document role uses either its pasted value or exactly one selected UTF-8 file; clear the selected file to paste. An empty or invalid active file never falls back to hidden pasted text. A filename label allows 512 UTF-8 bytes.
  • One leading BOM is removed and recorded, including pasted input. Invalid UTF-8, decoded duplicate JSON keys and unpaired Unicode surrogates are refused. Inputs stay in this browser.
  • A fixed 10-second whole-task deadline or cancellation returns no partial export. Rerun after correcting the input; a fresh Worker starts each job.
  • The query is a separate text control. Functions including count/length/match/search/value, JavaScript expressions and non-singular comparisons are refused; this is not full RFC 9535 conformance. The original query is not replaced by a normalized expression.
  • File contents are read only after Run, within the same fixed 10-second period as engine loading, checks and processing. Cancelling or exceeding any limit publishes no partial copy or download. Only the current tab holds the inputs in bounded memory.
  • The screen uses a bounded preview. Copy preserves the complete ordered value array; query-report.json preserves every matched location and the source identity. No content upload or remote reference fetch.
Open Query local JSON with JSONPath →