【发布时间】:2020-09-11 19:30:26
【问题描述】:
我有以下 json:
{
"store": {
"book": [ {
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
}, {
"category": "fiction",
"author": "J. R. R. Tolkien",
"title": "The Lord of the Rings",
"isbn": "0-395-19395-8",
"price": 22.99
} ],
"bicycle": {
"color": "red", "price": 19.95
}
},
"expensive": 10
}
我想通过以下方式检索所有books'author和category:
[ {
"category": "reference",
"author": "Nigel Rees"
}, {
"category": "fiction",
"author": "J. R. R. Tolkien"
} ]
【问题讨论】: