jquery $ .parseJSON(data);方法不起作用

时间:2014-04-06 06:08:42

标签: javascript jquery

解析方法不起作用。

$.get("viewsGroup.process", function(data) {
    $("#view_group").modal("show");
    alert(data);                  // this shows the no of objects..
    var data = $.ParseJSON(data); // not working ....
    alert("datata" + data);       // not working..
    console.log(data.name);
    alert("bacjkkkk");
});

1 个答案:

答案 0 :(得分:0)

我会简化代码:

$.getJSON("viewsGroup.process", function (d) {
    $("#view_group").modal("show");
    console.log(d);

    //whatever else you want to do

})
相关问题