Development
JSONPath 交互式测试场
一个交互式 JSONPath REPL,可对任意 JSON 运行多步查询管道。每行写一个 JSONPath 表达式(例如先 $..book[?(@.price<10)],再 $[0:5]),即可看到每一步的匹配数、路径和值——还附带一个可分享的 URL,编码了你的数据和管道。支持递归下降($..)、通配符([*])、过滤器([?(@.price<10)])、切片([0:5:2])和负索引。
html· HTML 结果打开工具
快速开始
用三种语言从你的代码中调用此工具。
cURL
curl -X POST 'https://api.elysiatools.com/zh/api/tools/jsonpath-repl-playground' \
-H 'Content-Type: application/json' \
-d '{"json":"{\n \"store\": {\n \"book\": [\n { \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": \"Sayings of the Century\", \"price\": 8.95 },\n { \"category\": \"fiction\", \"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99 },\n { \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": \"Moby Dick\", \"price\": 8.99 },\n { \"category\": \"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the Rings\", \"price\": 22.99 }\n ],\n \"bicycle\": { \"color\": \"red\", \"price\": 19.95 }\n }\n}","pipeline":"$..book[?(@.price < 10)]\n$[*].title","mode":"values","maxResults":100,"historyTitle":"Cheap books — titles"}'