json数据:
[
{
"id": 0,
"name": "fs",
"awardPunishs": [
{
"title": "奖励",
"content": "因为。。奖励122"
},
{
"title": "罚款",
"content": "因为。。罚款200"
}
]
},
{
"id": 1,
"name": "dewfwf",
"awardPunishs": [
{
"title": "奖励",
"content": "因为。。奖励122"
},
{
"title": "奖励",
"content": "因为。。奖励123"
}
]
}
]
希望得到表格:
查easyui api想得到啥都行
{field: 'awardPunishs', title: 'title',
formatter: function (val) {
return val[0].title
}, width: 100},
这种方式可以去到对应嵌套数组里的属性,取content的话是一样