私は検索しましたが、この質問を間違っている可能性がありますが、ここに私が持っているものがあります-
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」や「tags」などの値にアクセスする必要があることです。ある種の文字列検索およびストリップ タイプのスクリプトを記述しなくても、これらの値を取得する簡単な方法はありますか?