$
/
.
*
[n]
[*]
[,]
[:]
..
//
[?()]
[condition]
返回的结果均为数组
json{ "store": { "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 json[ "store": { "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 $.store json[ "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 $.store.* | $.store[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "color": "red", "price": 9.95 2, 10, 7, 9, 8, 5, -1 $.store.book[1] json[ "category": "fiction", "price": 18.95 $.store.book[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
{ "store": { "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 json[ "store": { "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 $.store json[ "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 $.store.* | $.store[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "color": "red", "price": 9.95 2, 10, 7, 9, 8, 5, -1 $.store.book[1] json[ "category": "fiction", "price": 18.95 $.store.book[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
json[ "store": { "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 $.store json[ "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 $.store.* | $.store[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "color": "red", "price": 9.95 2, 10, 7, 9, 8, 5, -1 $.store.book[1] json[ "category": "fiction", "price": 18.95 $.store.book[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
[ "store": { "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 $.store json[ "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 $.store.* | $.store[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "color": "red", "price": 9.95 2, 10, 7, 9, 8, 5, -1 $.store.book[1] json[ "category": "fiction", "price": 18.95 $.store.book[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
$.store
json[ "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 $.store.* | $.store[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "color": "red", "price": 9.95 2, 10, 7, 9, 8, 5, -1 $.store.book[1] json[ "category": "fiction", "price": 18.95 $.store.book[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
[ "book": [ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "bicycle": { "color": "red", "price": 9.95 "candy": [ 2, 10, 7, 9, 8, 5, -1 $.store.* | $.store[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "color": "red", "price": 9.95 2, 10, 7, 9, 8, 5, -1 $.store.book[1] json[ "category": "fiction", "price": 18.95 $.store.book[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
$.store.*
$.store[*]
json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "color": "red", "price": 9.95 2, 10, 7, 9, 8, 5, -1 $.store.book[1] json[ "category": "fiction", "price": 18.95 $.store.book[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 "color": "red", "price": 9.95 2, 10, 7, 9, 8, 5, -1 $.store.book[1] json[ "category": "fiction", "price": 18.95 $.store.book[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
$.store.book[1]
json[ "category": "fiction", "price": 18.95 $.store.book[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
[ "category": "fiction", "price": 18.95 $.store.book[*] json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
$.store.book[*]
json[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
[ "category": "reference", "price": 8.95 "category": "fiction", "price": 18.95 $.store..category json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
$.store..category
json[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
[ "reference", "fiction" $.store[?(@.price < 10)] json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
$.store[?(@.price < 10)]
json[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
[ "color": "red", "price": 9.95 $.store.[?(@.price < 10)] json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
$.store.[?(@.price < 10)]
json[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
[ "color": "red", "price": 9.95 "category": "reference", "price": 8.95 $..candy.[1,3,2] | $..candy[1,3,2] json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
$..candy.[1,3,2]
$..candy[1,3,2]
json[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
[ $..candy.[1:3] | $..candy[1:3] json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
$..candy.[1:3]
$..candy[1:3]
json[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
[ jsonpath-ng https://github.com/h2non/jsonpath-ng https://pypi.org/project/jsonpath-ng/ pip install jsonpath-ng pip install jsonpath-ng[ext](扩展包) pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
https://github.com/h2non/jsonpath-ng
https://pypi.org/project/jsonpath-ng/
pip install jsonpath-ng
pip install jsonpath-ng[ext](扩展包)
pip install jsonpath-ng[ext]
pythonimport json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'
import json from jsonpath_ng.ext import parse json_string = '{"store": ["xxx"]}'