跳转到主要内容
CuteJSON
↑↓ 导航 Enter 选择 Esc 关闭

JSONPath Tester

Write a query, see exactly what it matches, and find out precisely where a query with no results went wrong.

返回所有工具

键盘快捷键

这些快捷键在页面上对应操作存在时有效。

打开命令面板
Ctrl/Cmd + K
运行主要操作
Ctrl/Cmd + Enter
格式化
Ctrl/Cmd + Shift + F
压缩
Ctrl/Cmd + Shift + M
复制输出
Ctrl/Cmd + Shift + C
打开文件
Ctrl/Cmd + Shift + O
下载输出
Ctrl/Cmd + S
关闭此对话框
Esc
打开此对话框
F1 / ?

本地数据

以下所有内容仅存储在此浏览器、此设备上。

未保存的草稿
记住选项的工具

最近打开的文件

    此设备上尚未打开任何文件。

    通过链接分享

    内容被打包在链接 # 号之后的部分。

    分享此页面上的第一个输入。

    暂无可分享的内容。

    示例

    输入

    从 URL 加载

    直接从浏览器获取 URL。

    Matches

    Matches appear here.

    完全在您的浏览器中运行。

    关于此工具

    This implements the part of RFC 9535 that real queries use, and says so rather than claiming the whole specification and failing on an edge case. Names, wildcards, indexes including negative ones, slices with a step, unions inside one bracket, descendant segments and filters are all supported. Filters compare a relative path against a number, a string, true, false or null, combine with and, or and not, and test for a key simply by naming it. What is not supported is named on the page and reported by name when you use it: function extensions such as length, absolute paths inside a filter, and comparisons between two paths. Matching runs over the token stream, so every result carries its own path, its line, and the value exactly as you wrote it.

    使用方法

    1. Paste your JSON into the editor, or load the sample.
    2. Type a query, or press one of the examples. Results update as soon as you stop typing.
    3. Select a match to highlight it in the editor, and read the count above to confirm the query did what you meant.

    Supported syntax

    $ The whole document
    $.store.book A child by name
    $['a name'] A name that has a space or punctuation in it
    $.store.* Every child of a value
    $.book[0], $.book[-1] An element by position, counting back from the end with a minus
    $.book[1:4], $.book[::2] A range of elements, with an optional step
    $.book[0, 2], $['a', 'b'] Several selectors at once
    $..price The same selector at every depth
    $.book[?@.price < 10] Only the values that pass a test
    $.book[?@.isbn] Only the values that have a given key