搜索复杂的JSON数组和哈希中的项目时,例如:
[
{ "id": 1, "name": "One", "objects": [
{ "id": 1, "name": "Response 1", "objects": [
// etc.
}]
}
]
我可以使用某种查询语言来查找商品in [0].objects where id = 3吗?
in(...).where(...).select(...)):hugoware.net/Projects/jLinq。
data,其中包含您的JSON对象,你可以这样写:jsel(data).select("//*[@id=3]")它会用3.返回包含ID键的对象