var initQuestions = '[{ "Title": "1112", "QuestionType": { "ID": 2, "Value": "1", "Text": "Text", "Selected": true}}]';
var json = $.parseJSON( initQuestions );
Reference:
http://api.jquery.com/jquery.parsejson/
var initQuestions = '[{ "Title": "1112", "QuestionType": { "ID": 2, "Value": "1", "Text": "Text", "Selected": true}}]';
var json = $.parseJSON( initQuestions );
public ActionResult JsonRequest()
{
return Json(instanceOfClass, JsonRequestBehavior.AllowGet);
}
setup : function(ed) {
ed.onLoadContent.add(function(ed, o) {
var controlLoad = setTimeout(function() {
if ($('.mceIframeContainer').size()==1) {
$('form *:input[type!=hidden]:first').focus();
clearTimeout(controlLoad);
}
}, 100);
});
}
Code and working example link: