Pular para o conteudo principal
CuteJSON
↑↓ Navegar Enter Selecionar Esc Fechar

Query Workbench

Write a JSONPath or JMESPath query, pick the language you meant, and see exactly what it computes.

Voltar para todas as ferramentas

Atalhos de teclado

Estes funcionam onde a acao correspondente existe nesta pagina.

Abrir a paleta de comandos
Ctrl/Cmd + K
Executar a acao principal
Ctrl/Cmd + Enter
Formatar
Ctrl/Cmd + Shift + F
Minimizar
Ctrl/Cmd + Shift + M
Copiar saida
Ctrl/Cmd + Shift + C
Abrir arquivo
Ctrl/Cmd + Shift + O
Baixar saida
Ctrl/Cmd + S
Fechar este dialogo
Esc
Abrir este dialogo
F1 / ?

Dados locais

Tudo abaixo e armazenado apenas neste navegador, neste dispositivo. Nada e enviado a lugar nenhum, e fechar este dialogo nao e necessario para que isso continue verdade.

Rascunhos nao salvos
Ferramentas com opcoes lembradas

Arquivos abertos recentemente

    Nenhum arquivo aberto ainda neste dispositivo.

    Compartilhar via link

    O conteudo e empacotado na parte do link apos o #, que navegadores nunca enviam a um servidor.

    Compartilha a primeira entrada nesta pagina.

    Nada para compartilhar ainda.

    Exemplos

    Entrada

    Carregar de uma URL

    Busca a URL diretamente do seu navegador.

    Result

    O resultado aparece aqui.

    Funciona inteiramente no seu navegador.

    Sobre esta ferramenta

    JSONPath and JMESPath answer different questions, so this tool never guesses which one a query is written in, the switch above the query box picks the language. JSONPath finds locations inside a document: every match keeps the shape it already had. JMESPath computes a new value instead: a pipe, a multi-select or a function call can reshape the data into something the document never literally contained, a list of just the fields you asked for, a single number, a document sorted by a field that only appears buried three levels down. This page implements the whole JMESPath 1.0 language, including every function in its standard library, listed below. It does not implement JSONata or jq-style expressions, both of which are their own considerably larger languages, and says so rather than quietly falling back to something else. The JSONPath mode reuses the same engine as the dedicated JSONPath Tester on this site; reach for that tool instead when you want to click a match and see it highlighted inside your document, since this page always prints a computed result rather than a browsable list of locations.

    Como usar

    1. Paste your JSON into the editor, or load the sample.
    2. Choose JSONPath or JMESPath, then write a query or press one of the examples.
    3. Read the result on the right. A JMESPath query computes a new value; a JSONPath query lists every match.

    JMESPath functions

    The whole standard library, the same 25 functions the specification defines.

    abs(number) Absolute value.
    avg(array) Average of the numbers, null if empty.
    ceil(number) Rounds up.
    contains(subject, value) True if the string or array contains it.
    ends_with(string, suffix) True if the string ends with it.
    floor(number) Rounds down.
    join(glue, array) Joins strings with a separator.
    keys(object) The object's own keys.
    length(value) Character, element or key count.
    map(&expr, array) Applies an expression to every element.
    max(array) The largest value, null if empty.
    max_by(array, &expr) The element with the largest computed value.
    merge(object, ...) Shallow merges objects, left to right.
    min(array) The smallest value, null if empty.
    min_by(array, &expr) The element with the smallest computed value.
    not_null(value, ...) The first argument that is not null.
    reverse(value) Reverses a string or an array.
    sort(array) Sorts numbers or strings, ascending.
    sort_by(array, &expr) Sorts by a computed value, stably.
    starts_with(string, prefix) True if the string starts with it.
    sum(array) Adds up the numbers.
    to_array(value) Envolve um nao-array em um array, mantem um array como esta.
    to_string(value) The value as a string.
    to_number(value) O valor como numero, nulo se nao puder ser lido como tal.
    type(value) The JMESPath type name.
    values(object) The object's own values.

    Need the full JSONPath syntax table, or want to click a match to see it highlighted in your document? Use the dedicated JSONPath Tester instead.