数据表中的复杂标题

时间:2013-03-01 10:53:33

标签: javascript jquery datatable

enter image description here我有以下格式的json

[{"Employe": "",
"otherinfo": "",
"details": {
    "E": "1",
    "B": "1",
    "M": "0",
    "SR": "Yes"
}
}]

我想填充数据表....如何做...

var Table = $('#Table').dataTable({
    "bProcessing": true,
    "sAjaxSource": "Script/values.json",
    "bJQueryUI": true,
    "bAutoWidth": true,
    "aoColumns": [

                    { "mData": "Employee" },
        { "mData": "otherinfo" },
                    { "mData": "details" },
                    { "mData": "E" },
           { "mData": "B" },
           { "mData": "M" },
           { "mData": "SR" },
                ]
});

它不正确......这里有什么不对

我认为这样的事情可能会有所帮助

                 { "mData": "details"
                            {
                                "mData": "E",
                                "mData": "B",
                                "mData": "M",
                                "mData": "SR"
                             },
                    },

1 个答案:

答案 0 :(得分:0)

{ "mData": "details.E" },
{ "mData": "details.B" },