我们可以实现Jquery Template,方便渲染JSON数据。用法如下
1.下载“ jquery.tmpl.min.js ”文件并包含在您的页面中。
2.我们将表格
 视为我们的容器。我们将定义需要插入到容器中的模板。
模板示例:
  //The data inside JSON object we will use as follows
 //Note:Template definition should be inside Script tag same as javascript functions
 <script id="tableContentTemplate" type="text/x-jquery-tmpl">
    <tr> 
      <td> Deal Id :\${EncoderName }</td> 
      <td> Deal Id :\${EncoderStatus }</td> 
    </tr>   
 </script>
3.定义通过模板将数据渲染到容器的方法。根据需求,我们可以更改这些方法,因为它们是用户定义的方法
 function emptyContainer(container){    
  $( container ).empty();    
 }
function renderTemplate( container, template, data ){        
  $.tmpl( $(template), data, {array: data} ).appendTo( container );
}
function AddExtraTemplate( container, template ){
    $.tmpl( $(template)).appendTo( container );
}
4.Ajax成功函数调用方法如下   
 $.getJSON("http://www.celeritas-solutions.com/pah_brd_v1/productivo/getGroups.php?organizationCode=att&userId1", function (data) {
    emptyContainer("#div-my-table");//empty container
    renderTemplateForOffice( "#div-my-table", "#tableContentTemplate" , data ); 
    // render template based on data.For multiple values it will render multiple times.Separate Iteration is not required.
});
请检查您的 json 数据,它应该如下所示 {'EncoderName':'XYZ','EncoderStatus':'Completed'}