私の問題は非常に単純です。new.jsonという名前のファイルがあり、JQueryを使用してデータをロードして表示しようとしています。私はJavaScriptコードを書いています:
$.getJSON("new.json", function(data){
// I have placed alert here previously and realized it doesn't go into here
$.each(data.streetCity, function(i,s){
alert(s);
});
});
}
new.jsonのデータは次のようになります。
{"streetCity":
{
"1":"Abergement-Clemenciat",
"2":"Abergement-de-Varey",
"3":"Amareins"
}
};