我想获得类似的结果,如下图所示。
预期结果:
问题:寻找 Jquery 或 javascript 解决方案来创建动态表以及 Rowspan。我在获取父行并添加行跨度时遇到问题。
非常感谢您的帮助。
这是我的 JSON 格式和我想要实现的目标:
var data={"result": [
{
"RMP_MASTER_WILAYAH_ID": "20190402080337958516",
"RMP_MASTER_WILAYAH_KODE": "02",
"RMP_MASTER_WILAYAH_detail": [
{
"RMP_MASTER_WILAYAH_ID": "20190402080403561417",
"RMP_MASTER_WILAYAH": "KUALA ENOK",
"RMP_MASTER_WILAYAH_relasi": [
{
"RMP_MASTER_PERSONAL_ID": "20190329144213331884",
"RMP_MASTER_PERSONAL_NAMA": "YANTO KHO",
},
{
"RMP_MASTER_PERSONAL_ID": "20190329144712243937",
"RMP_MASTER_PERSONAL_NAMA": "USMAN",
}
]
},
{
"RMP_MASTER_WILAYAH_ID": "20190402080355461744",
"RMP_MASTER_WILAYAH": "ENOK",
"RMP_MASTER_WILAYAH_relasi": [
{
"RMP_MASTER_PERSONAL_ID": "20190329150712446114",
"RMP_MASTER_PERSONAL_NAMA": "NURDIN",
},
{
"RMP_MASTER_PERSONAL_ID": "20190329151404711228",
"RMP_MASTER_PERSONAL_NAMA": "H. HARUNA RASYID",
}
]
},
{
"RMP_MASTER_WILAYAH_ID": "20190402080411413459",
"RMP_MASTER_WILAYAH": "PARIT PINANG",
"RMP_MASTER_WILAYAH_relasi": [
{
"RMP_MASTER_PERSONAL_ID": "20190329153052471217",
"RMP_MASTER_PERSONAL_NAMA": "SUWANDI",
},
{
"RMP_MASTER_PERSONAL_ID": "20190329153610274231",
"RMP_MASTER_PERSONAL_NAMA": "BEDDU",
}
]
}
]
翻阅古今
慕娘9325324