title: VM603:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1?
body: <pre><code>n.parseJSON @   jquery-1.12.3.min.js:4
  showTable   @   query.html:107
  success @   query.html:98
  i   @   jquery-1.12.3.min.js:2
  fireWith    @   jquery-1.12.3.min.js:2
  y   @   jquery-1.12.3.min.js:4
  c   @   jquery-1.12.3.min.js:4
  </code></pre>
  
  <p>Above is the error info of code.</p>
  
  <p>I want to parse JSON object to array,and render the array into the HTML. But I don't know how to handle it by the following?</p>
  
  <p>Following is the part js code of mine , function of showTable(data) is parse the json object into html table.function requestData() is request info from the back.</p>
  
  <pre><code> (function(){
          var form = $("form");
          var contentCenter = $(".content-center");
          $(".s-btn").on("click",function(event){
              $(".container").css({
                  "position":"relative"
              })
              form.css({
                  "position":"absolute",
                  "left":"15px",
                  "top":"0px"                 
              });
              contentCenter.css({
                  "position":"absolute",
                  "top":"-12px"   
              })
  
              event.preventDefault();
              requestData();
          });
  
          //与后台交互数据
          function requestData(){                                 
  
              var data = {
                  type : $("#form_control").val(),
                  keywords : $.trim($("#ipt_control").val())
              };
              $.ajax({
                  type : "GET",
                  url : "data/data.json",
                  dataType : "json",
                  data : data,                    
                  success:function(msg){
                      //TODO请求成功后跳转页面
                      //处理后台返回的数据
                      console.log(msg);
                      showTable(msg);
                  },
                  error:function(msg){
                      console.log("failed");
                  }
              }); 
          }   
          //获取json数据，动态创建表格
          function showTable(data){
              var dataArray = $.parseJSON(data);
              console.log(dataArray);
              var tableStr="&lt;table class='table table-bordered'&gt;"
              tableStr = tableStr + "&lt;thead&gt;&lt;td&gt;id&lt;/td&gt;&lt;td&gt;name&lt;/td&gt;handle&lt;td&gt;&lt;/td&gt;"
              var len = dataArray.length;
              for(var i=0;i&lt;len;i++){
                  tableStr = tableStr + "&lt;tr&gt;&lt;td&gt;" + dataArray[i].id + "&lt;/td&gt;" + "&lt;td&gt;" + dataArray[i].name + "&lt;/td&gt;" + "&lt;td&gt;" + dataArray[i].handle + "&lt;/td&gt;&lt;/tr&gt;";
              }
              tableStr = tableStr + "&lt;/table&gt;"
              $("#dataType").html(tableStr);
          }       
      })();
  </code></pre>