1
我已經搜查,我可以問這個問題錯了,但這裏是我 -JSON如何將字符串值內訪問數組中的Joomla表中的jQuery
我從的Joomla出口JSON數據有幾個關鍵:值,如:
....
"images":"{\"image_intro\":\"\",\"float_intro\":\"\",...}",
"urls":"{\"urla\":null,\"urlatext\":\"\",\"targeta\":\"\",...}",
"metadata":"{\"tags\":[4,12],\"robots\":\"\",...}",
....
測試腳本:
$.getJSON('data.json', function(data) {
$.each(data, function(index) {
var product = this;
var title = product.title;
var tags = // ?????
console.log(index + ': ' + title);
console.log('Metadata: ' + tags); // ????
});
});
的問題是,我需要訪問的東西,如「image_intro」和「標籤」的值。有沒有一種簡單的方法來檢索這些值,而無需編寫某種字符串搜索和strip類型的腳本?