如何從JSON格式搜索關鍵字。使用jQuery或JavaScript如何使用javascript或jquery從JSON搜索文本
我有一個JSON內容。從那我需要搜索並獲得搜索關鍵字的ID。
關鍵詞: 「權威」=>我想獲得ID爲4
關鍵詞: 「基本」=>我想獲得ID爲3
{
"data": {
"1":[
{
"id":"3",
"title":"my title",
"content":"this is very basic sample content"
},
{
"id":"4",
"title":"My sample title and text",
"content":"renewed by a licensing authority may be signed by such officer by the State Government.<p></p>"
}
]
}
}
http://stackoverflow.com/questions/5288833/how-to-search-json-tree-with-jquery – Quantico 2014-09-18 17:31:21