JSON 목록으로 드롭 다운 목록을 채우는 데 문제가 있습니다. 여기 내 기능에서 수행하고있는 작업이 있습니다.jsonList를 jsonery 드롭 다운 목록으로 구문 분석하는 중 오류가 발생했습니다.
onPhaseChange1: function(dropdown, row) {
var combobox = $(dropdown);
comboboxWorkUnit = row.find("select.workUnit");
EmployeeType = $("input[id*='EmployeeType']").val();
comboboxWorkUnit.show();
comboboxWorkUnit.empty();
var jsonList = {
[{ "Id": "12345", "WorkUnitId": "SR0001954", "Description": "Test Service Request From Serena", "WorkUnitCategory": "ServiceRequest" },
{ "Id": "12355", "WorkUnitId": "WOR001854", "Description": "Test Work Order From Serena", "WorkUnitCategory": "ServiceRequest" },
{ "Id": "12365", "WorkUnitId": "DBR001274", "Description": "Test Database Related Service Request From Serena", "WorkUnitCategory": "ServiceRequest"}]}
$($.parseJSON(jsonList)).map(function() { $('<option>').val(this.Id).text(this.Id).appendTo(comboboxWorkUnit); });
},
$ .parseJSON()은 문자열을 필요로합니다. 대신에 객체를 전달하는 것처럼 보입니다. –