I have a JSON
response like this:
data = [{
ProteinID: "2334",
Feature: "GVN",
Count: 1
},
{
ProteinID: "2334",
Feature: "LPA",
Count: 3
},
{
ProteinID: "2334",
Feature: "EEG",
Count: 2
},
{
ProteinID: "2334",
Feature: "VEP",
Count: 3
},
{
ProteinID: "2334",
Feature: "AEM",
Count: 2
},
{
ProteinID: "28731",
Feature: "GVN",
Count: 3
},
{
ProteinID: "28731",
Feature: "LPA",
Count: 3
},
{
ProteinID: "28731",
Feature: "VEP",
Count: 3
},
{
ProteinID: "1234",
Feature: "VEP",
Count: 3
},
{
ProteinID: "1234",
Feature: "MOB",
Count: 3
}
]
The above data is based the Feature column inner join. I need to create the table in html format like. I retrive the data from database. so the column will be change
Expected output look like
ProtienID GVN LPV EEG VEP AEM MOB
2334 1 3 2 3 2 -
28731 3 3 - 3 - -
1234 - - - 3 - 3
note: column name will be dynamically change