Language/Java Script

String 형을 json 형태로 형변환

selles9903 2017. 2. 9. 16:08

http://rayaspnet.blogspot.kr/2014/01/how-to-convert-string-to-json-array-in.html?m=1



Wednesday, January 8, 2014

How to convert a string to json array in Javascript?

By JQuery:
var initQuestions = '[{ "Title": "1112", "QuestionType": { "ID": 2, "Value": "1", "Text": "Text", "Selected": true}}]';
var json = $.parseJSON( initQuestions );

Reference:
http://api.jquery.com/jquery.parsejson/