var NEWARR = [
{"Branchid": 1, "Branchname": "City II", "Branchfullname": "City Two Branch", "Issuetypeid": 101, "Issuetypename": "Macro honeycomb tablet weak coverage", "total" : 242, "Withoutdemand": 139, "Withdemand": 103},
{"Branchid": 2, "Branchname": "City II", "Branchfullname": "City Two Branch", "Issuetypeid": 102, "Issuetypename": "Macro honeycomb 2G high upside down", "total" : 146, "Withoutdemand": "Withdemand": 79},
{"Branchid": 3, "Branchname": "City II", "Branchfullname": "City Two Branch", "Issuetypeid": 103, "Issuetypename": "Macro Cellular road black spot", "Total" : 334, "Withoutdemand": 151, "Withdemand": 183},
{"Branchid": 4, "Branchname": "City II", "Branchfullname": "City Two Branch", "Issuetypeid": 104, "Issuetypename": "Macro honeycomb high load cell", "Total" : "Withoutdemand": $, "Withdemand": 0},
{"Branchid": 5, "Branchname": "City II", "Branchfullname": "City Two Branch", "Issuetypeid": "", "Issuetypename": "Macro cellular new District planning", "Total": 0 , "Withoutdemand": 0, "Withdemand": 0},
{"Branchid": 6, "Branchname": "City II", "Branchfullname": "City Two Branch", "Issuetypeid": 106, "Issuetypename": "Macro cellular complaint", "Total": 989 , "Withoutdemand": 892, "Withdemand": 97},
{"Branchid": 7, "Branchname": "City II", "Branchfullname": "City Two Branch", "Issuetypeid": 107, "Issuetypename": "Macro Cellular market demand", "total": 0 , "Withoutdemand": 0, "Withdemand": 0},
{"Branchid": 8, "Branchname": "City II", "Branchfullname": "City Two Branch", "Issuetypeid": 108, "Issuetypename": "Macro cellular protection demand", "total": 0 , "Withoutdemand": 0, "Withdemand": 0}];
var ths = [];
var td1 = [];
var td2 = [];
for (Var i=0;i<newarr.length;i++) {
Ths.push (Newarr[i]. Branchid);
Td1.push (Newarr[i]. Withdemand);
Td2.push (Newarr[i]. Total);
}
c = Ths.concat (TD1,TD2);//Array Merging
Console.log (c)
var k = 0;
var str = ';
str + = "<table border= ' 1 ' bordercolor= ' #000 ' >";
str + = ' <th colspan= ' 4 >1</th> '; str + = ' <th colspan= ' 4 ' >2</th> ';//cell Merge Horizontal merge colspan= "" Vertical merge Rowspan= "" and table header contents
for (var i = 0; i < i++) {//altogether 13 rows
str + = ' <tr> ';
for (var j = 0; J < 8; J + +) {//Altogether 8 columns
var tds = ' <td> ' + c[k] + ' </td> ';
k++;
str + = TDS;
}
str + = ' </tr> ';
}
str + = ' </table> ';
$ (' #divId '). html (str);
About table dynamic Add data cell merge array merge