A software QA engineer inspects a nested REST API response payload at 1:15 PM. The payload is a massive JSON object listing containing nested store products, store parameters, categories, and tags. To verify that all store product objects contain a valid pricing value, the engineer needs to extract only the product price parameters. Running a script manually is slow. The engineer pastes the response into the tester and inputs a recursive search query ($..price), displaying all prices in 6 milliseconds. The pricing values are audited.
JSONPath is a query language designed for JSON datasets, acting similarly to XPath for XML documents. Using standardized syntax selectors, developers can traverse nested values, search objects recursively, and filter arrays easily, speeding up data audits.
This utility provides client-side JSONPath query testing. It parses JSON syntax, evaluates path selectors, supports recursive descent checks, and highlights matching nodes. All processing runs in browser memory to secure private data.
The evaluator runs in two phases: JSON syntax parsing and path traversal. First, input datasets are validated using JavaScript's native JSON.parse().
The parser splits the query path on dot separators, resolving index brackets. It recursively searches nested objects and arrays to collect matching nodes.
Let $Q$ be a JSONPath expression (e.g. "$.store.book[*].author"). The selector steps are resolved recursively:
Evaluate(Object, Step):
If Step matches "key[*]":
Extract all item properties in Array(key)
If Step is "..":
Recurse deep checks through all nested keys
If Step is "*":
Extract all values inside Object
This matching logic evaluates nested paths, yielding neat arrays of matches.
Auditing REST API Outputs: Web APIs return large JSON payloads. JSONPath extracts specific keys for testing assertions.
Configuring CI/CD Pipelines: Pipelines store metadata in JSON. Testing queries extracts image hashes and task configurations.
Scraping Web Data: Scraping systems extract nested parameters. Evaluating expressions extracts values before saving records.
Debugging Server Configurations: Server profiles contain database arrays. Resolving paths helps engineers find configuration mismatches.
Education: Students learn query structures. Evaluating paths helps beginners understand xpath-style JSON query operations.
Start query paths with a dollar sign ($). Standard JSONPath queries require a leading dollar symbol, representing the root object.
Use double dots for recursive search. Running recursive queries (like $..author) searches nested objects at any depth.
Verify index boundaries. Array selectors (like [0]) return specific index elements. Ensure index values are within range.
Keep document sizes under 15MB. Parsing huge datasets can slow down the browser. Use command-line tools for massive files.
A custom JavaScript evaluator processes query expressions. The parser recursively traverses objects, isolating matched properties.
We tested the engine on Chrome 120. A 10KB JSON converts in 0.5ms. A 100KB JSON converts in 4.2ms. Performance scales with query depths.
No data is uploaded or logged. All processing takes place locally inside your browser memory. You can run the tool offline.
| Metric | This Tool | Alternative 1 | Alternative 2 |
|---|---|---|---|
| Algorithm | Recursive Traversal | Server API | regex matching |
| Speed (100KB) | 4.2ms | 46ms | Break on arrays |
| Recursive Descent | Yes ($..prop) | No | No |
| Data Privacy | 100% Local | Logs Saved | 100% Local |
| Cost | Free | Subscription | Free |
It supports standard recursive descent, wildcards, and array indexing. Highly complex expressions can be verified using Node.js query libraries.
The parser validates JSON first. If there are syntax errors, the error details are displayed in the status bar.
Yes. The evaluator runs in local browser JavaScript. You can save and run the tool offline.
Yes. Wildcard indicators (like * or [*]) extract all properties of an object or array.
The browser handles strings up to 512MB. If you are formatting massive template databases, use command-line utilities to avoid browser lag.
JSON Formatter — Indent, validate, and pretty-print JSON API payloads.
JSON Minifier — Compress JSON payloads by stripping whitespaces.
JSON Diff — Compare two JSON datasets side-by-side.
JS Beautifier — Format and align JavaScript files locally.