How to add server data to timeline through AJAX

Hi,

The first use is not very clear.

My local data is displayed, but the data requested through AJAX is placed in scheduler. parse (list, json); the method does not appear.

$.get(’/initAddReserve’).then(res => {
list = res;
scheduler.parse(list, “json”);
}).catch(function (err) {
console.log(err);
});

Data can be obtained, but cannot be loaded into the program.

The data obtained are as follows:
{
“data”: [
{
“id”: 105,
“deGrade”: “1”,
“deRoomId”: 3,
“deRoomName”: “ccc”,
“deMeetingName”: “bbb”,
“deReserveDepartment”: “aaa”,
“deReserveDepartmentId”: “884235”,
“deReserve”: “pengzhao”,
“deReservePhone”: “123”,
“deReserveNumber”: 123,
“deMain”: “1111”,
“text”: “123”,
“deMeetingOver”: “2018-10-24T02:00:00.000+0000”,
“deMeetingStart”: “2018-10-24T00:00:00.000+0000”,
“deDepartmentReservePerson”: null,
“deMeetingStatus”: “-1”,
“deMeetingCount”: null,
“deDateCount”: null,
“deGradeId”: 1,
“deReserveId”: 5007,
“deDepartmentReservePersonId”: null,
“deShow”: 1,
“dePubTemplate”: “{“content”:”",“id”:-1,“layoutId”:-1,“name”:“nullTemplate”,“thumb”:"/images/preset/2018_06_04_13_30_06.png"}",
“start_date”: “2018-10-24 08:00”,
“end_date”: “2018-10-24 10:00”,
“showStartDate”: “2018-10-24 08:00”,
“showEndDate”: “2018-10-24 10:00”
}
],
“collections”: {
“rooms”: [
{
“value”: 1,
“meetingRoomScale”: 16,
“label”: “one”,
“meetingEquipmentList”: “1,2,3,4,5”,
“meetingRoomStatus”: 1,
“pubIp”: “123”,
“presetmodeList”: null,
“type”: 1,
“status”: 1
}
]
}
}

Seek help

You may try to stringify your generated json before parsing it to the scheduler.