1
我從使用ajax請求的PHP頁面獲得低於JSON的結果。我嘗試了很多以獲得理想的結果。我已經做了下面的方法,但仍然無法按預期得到。JSON值搜索
{
"search": {
"entry": [
{
"attribute": [
{
"name": "title",
"value": [
"Mr."
]
},
{
"name": "mail",
"value": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}
]
}
]
}
}
我曾嘗試以下搜索使用Defiant.js
success: function (data) {
var xx=JSON.stringify(data);
// var got = $.each(data.search.entry[0].attribute, function (i, v) {
// return v;
//
// });
alert(xx);
var z=JSON.search(xx, '//*[name="title"]/value[1]');
alert(z);
},
我怎麼能得到像title='Mr'
或mail='[email protected]'
結果得到的值。
https://meta.stackoverflow.com/questions/355102/a-user-massively-tries-to-add-irrelevant-tags-which-i-can-see-while-reviewing-s? CB = 1 –