I just prepared a data and want to display in html table but the problem is that every time I call the $http service it returns n number of columns. So basically what I want to display is that first row of the data should be used for column names and rest are rows. Sure the column names are not fixed there could be n number of columns. Below is the sample data:
[["Product",2016,2017],["A",50.92,550],["B",10,0],["C",20,0]]
or
[["Product",2015, 2016,2017],["A",80, 50.92,550],["B",20, 10,0],["C",75,20,0]]
I tried this but not getting how to print the first row as column and display remaining rows beneath.
<table style="width:100%; font-size:11px; " ng-repeat="(key, value) in NewTable">
<thead>
<tr style="background-color:#00372B; height: 50px; ">
<th style="padding:1%; color:white;" colspan="3">{{ key }}:{{value}}</th>
</tr>
</thead>
</table>
Request someone to provide the solution with angular-filter as well so I can add some calculated columns on the table as well. Thanks.