jsonpath的基本语法:
实例:
json值:
{ “store”: {
“book”: [
{ “category”: “reference”,
“author”: “Nigel Rees”,
“title”: “Sayings of the Century”,
“price”: 8.95
},
{ “category”: “fiction”,
“author”: “Evelyn Waugh”,
“title”: “Sword of Honour”,
“price”: 12.99,
“isbn”: “0-553-21311-3”
}
],
“bicycle”: {
“color”: “red”,
“price”: 19.95
}
}
}
输出book[0]的author值
输出全部author的值
输出book[*]中category == 'reference’的book
输出book[*]中price>10的book
输出book[*]中含有isbn元素的book
输出该json中所有price的值
输出该json中所有title的值
输出该json中book 0,1的值