JSON
Probador de JSONPath
Prueba de expresiones JSONPath en datos JSON reales — vista previa instantánea de los valores encontrados y sus rutas.
$ — raíz · .key / ['key'] — propiedad · .. — búsqueda recursiva · [*] — todos los elementos · [0,1] — índices · [0:2] — sección · [?(@.price<10)] — filtro
—
JSONPath lets you reach into nested JSON values the way XPath does for XML — a compact path string like $.users[0].email instead of manually walking the structure. This tool lets you test an expression against real data and see the result instantly.
How to use it
- Paste JSON data into one field and a JSONPath expression into the other.
- The result shows every matched value along with its exact path, even when there are several matches.
- Use [*] to iterate over every array element, or a filter like [?(@.price > 100)] for conditional selection.
Common uses
- Working out the right JSONPath expression to pull a specific field from an API response before pasting it into code.
- Testing data-transformation or message-routing rules that rely on JSONPath (for example, in AWS Step Functions or an API Gateway).
- Quickly locating a value in a large, deeply nested JSON document without scrolling through it manually.
Things to keep in mind
There's no single official JSONPath standard — the basic syntax (dots, brackets, *) is supported the same way everywhere, but filters and more advanced expressions differ between libraries.
Array indexing in JSONPath starts at zero, like in most programming languages — [0] means the first element.
Artículo sobre esta herramienta: JSONPath: buscar datos en JSON sin analizarlo a mano
Preguntas frecuentes
¿Cuál es la diferencia entre $.key y $..key?
$.key accede a la propiedad key solo en el nivel actual, mientras que $..key la busca de forma recursiva en todos los niveles anidados.
¿JSONPath se parece a alguna tecnología conocida?
Sí, es conceptualmente similar a XPath pero para JSON en lugar de XML, con una sintaxis propia como [*] para todos los elementos o [?(@.price<10)] para filtros.
¿Son seguros los datos JSON que pruebo aquí?
Sí, toda la evaluación se realiza localmente en tu navegador mediante JavaScript, ni los datos ni la expresión JSONPath se envían a ningún servidor.
¿Cómo accedo a una clave que contiene un punto o un espacio?
Mediante corchetes y comillas: $['user.name'] en vez de $.user.name — de lo contrario, el analizador interpretará el punto como separador de anidamiento y no como parte del nombre de la clave.
¿Existe un único estándar oficial para JSONPath?
No. La sintaxis básica (puntos, corchetes, asterisco) se admite de forma prácticamente igual en todas partes, pero los filtros y las expresiones avanzadas varían entre bibliotecas — conviene comprobar la compatibilidad para expresiones complejas.