给出:
{ "store": {
"Test": "Tester1",
"Test2": "Tester2",
"book": [
{ "category": "reference",
"author": "Nigel",
"title": "Sayings of the Century",
"price": 8.95
},
{ "category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword",
"price": 12.99
}
],
"bicycle": {
"color": "red",
"price": 19.95
}
JSON路径-$ .store.book将仅返回子元素。
我想要的是将父书包含其子值:
{
"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
}
]
}
谢谢!