출처: http://november11tech.tistory.com/88 [Mr.november11] json.Parse :: 사월은 봄이다.

여기서 result 는 json 형태의 string 이다.


 


 


result =>  [{"data_id":"2011","data_name":"Statement ","data_seq":13,"data_type":"S","parent_data_seq":"Indicator"},{"data_id":"2022","data_name":"aaaaa","data_seq":20,"data_type":"S","parent_data_seq":"Indicator"},{"data_id":"2013","data_name":"MC/DC Coverage","data_seq":17,"data_type":"S","parent_data_seq":"Indicator"}]


 


 


 


var jsonobj = JSON.parse(result);


 


for(var index = 0 ; index < listSize ; index++){


$J('#columnDataList').append($J("<option/>", { value: jsonobj.result[index].data_id , 


text: jsonobj.result[index].data_name }));


    } 

'개발 > JavaScript' 카테고리의 다른 글

java 웹 실행 순서  (0) 2018.02.13
selectbox  (0) 2018.02.13
location.href / location.replace  (0) 2018.02.13
브라우저 크기 조절 이벤트  (0) 2018.02.13
Uncaught SyntaxError: Unexpected token  (0) 2018.02.13

+ Recent posts