Pega un JSON o una URL, arrastra un archivo, o carga un para empezar.
Aquí aparecerán tus resultados
Pega tus datos o una URL arriba, o empieza con una de estas opciones:
Consejo: pulsa Ctrl + Enter en el editor para procesar.
- 3 lenguajes de consultaJSONPath (RFC 9535), JSONSelect y JSON Query.
- Rutas de cada resultadoVe exactamente dónde está cada coincidencia JSONPath.
- 100% localTus datos nunca salen del navegador. Sin subidas ni rastreo.
- Ejemplos clicablesPulsa cualquier ejemplo de abajo para probarlo con los datos de muestra.
Ejemplos de JSONPathReferencia de sintaxis ↗
- Todos los autores
$.store.book[*].author→["Nigel Rees", "Evelyn Waugh", "Herman Melville", "J. R. R. Tolkien"]- Todos los precios, a cualquier nivel
$..price→[8.95, 12.99, 8.99, 22.99, 19.95]- Último libro
$.store.book[-1].title→["The Lord of the Rings"]- Los dos primeros libros
$.store.book[0:2].title→["Sayings of the Century", "Sword of Honour"]- Libros con ISBN
$..book[?@.isbn].title→["Moby Dick", "The Lord of the Rings"]- Libros de menos de 10
$..book[?@.price < 10].title→["Sayings of the Century", "Moby Dick"]- Búsqueda con regex
$.store.book[?search(@.author, "Tolkien")].title→["The Lord of the Rings"]
Ejemplos de JSONSelectReferencia de sintaxis ↗
- Todos los autores
.author→["Nigel Rees", "Evelyn Waugh", "Herman Melville", "J. R. R. Tolkien"]- Títulos dentro de "book"
.book .title→["Sayings of the Century", "Sword of Honour", "Moby Dick", "The Lord of the Rings"]- Primer libro
.book > :first-child > .title→["Sayings of the Century"]- Libros con ISBN
:has(.isbn) > .title→["Moby Dick", "The Lord of the Rings"]- Precios de menos de 10
.price:expr(x < 10)→[8.95, 8.99]- Título que contiene un texto
.title:contains("Lord")→["The Lord of the Rings"]- Todos los números
number→[8.95, 12.99, 8.99, 22.99, 19.95]
Ejemplos de JSON QueryReferencia de sintaxis ↗
- Todos los títulos
.store.book | map(.title)→["Sayings of the Century", "Sword of Honour", "Moby Dick", "The Lord of the Rings"]- Filtrar y después mapear
.store.book | filter(.price < 10) | map(.title)→["Sayings of the Century", "Moby Dick"]- Precios ordenados
.store.book | sort(.price) | map(.price)→[8.95, 8.99, 12.99, 22.99]- Suma de precios
.store.book | map(.price) | sum()→53.92- Recuento por categoría
.store.book | groupBy(.category) | mapValues(size())→{"reference": 1, "fiction": 3}- Elegir campos, los dos primeros
.store.book | pick(.title, .price) | limit(2)→[{"title": "Sayings of the Century", "price": 8.95}, {"title": "Sword of Honour", "price": 12.99}]