以下のようなJSON文字列を取得しています
[
{
"id": 20,
"title": "a",
"allDay": true,
"start": "2012-12-04 00:00",
"end": "2012-12-07 00:00",
"color": "#eb491d",
"startDate": "/Date(1354559400000)/",
"endDate": "/Date(1354818600000)/",
"Location": "a",
"StartDatestr": "2012-12-04",
"EndDatestr": "2012-12-04",
"StartTime": "00:00",
"EndTime": "00:00",
"Alert": false,
"Repeat": false,
"RepeatDays": 0,
"CalendarID": 13,
"CustomerNo": 593963,
"CustomerName": "test_apple",
"IsProspect": true,
"Description": ""
}
]
以下のように長さを確認すると「1」が返されます
console.log(myAppointment.length);
しかし、以下のようにアクセスしようとすると、未定義のエラーが発生します。
var myAppointment = JSON.parse(data.d);
sessionStorage.CustomerID = data.CustomerNo;
console.log(sessionStorage.CustomerID);
何も思いつきません。誰かが私がここで欠けているものを教えてもらえますか