質問があります。いくつかの情報を含む json があり、場所などの特定の値を取得する必要があります。関数を作成しましたが、正常に動作しません。「 」に関するこのエラー メッセージが表示されます。
SyntaxError: invalid label
"location" : "Austin-Bergstrom International Airport,
機能はこれ
function lee_json() {
var temp = ('http://df9e7c46aa4c80573717-1199cc892ebab574a120721e4772cd8b.r11.cf2.rackcdn.com/services/aus.json');
temp2 = temp.location;
alert(temp2);
console.log(temp);
console.log(temp.location);
}
Jsonはこれです
{
"location" : "Austin-Bergstrom International Airport, Tx",
"city" : "Austin",
"state" : "Tx",
"dewPointC" : 4.4,
"visibilityMiles" : 10,
"rainChance" : "10%"
}
何が問題になる可能性がありますか?
よろしく、