是否有JSON等效的XQuery / XPath? [英] Is there a JSON equivalent of XQuery/XPath?
本文介绍了是否有JSON等效的XQuery / XPath?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在复杂的JSON数组和哈希中搜索项目时,例如:
When searching for items in complex JSON arrays and hashes, like:
[
{ "id": 1, "name": "One", "objects": [
{ "id": 1, "name": "Response 1", "objects": [
// etc.
}]
}
]
是否有某种查询语言我可以在[0] .objects中找到一个项目,其中id = 3
?
Is there some kind of query language I can used to find an item in [0].objects where id = 3
?
推荐答案
是的,它被称为 JSONPath 。该来源现在在 GitHub 上。
Yup, it's called JSONPath. The source is now on GitHub.
它还集成到 DOJO 。
这篇关于是否有JSON等效的XQuery / XPath?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文