Tahreem Iqbal Tahreem Iqbal - 1 year ago 75
JSON Question

Populate table with JSON list without knowing what the properties are

I'm receiving a

list from server that could contain any number of properties of any name. I need to show that list on my page. Populating a table when you know the names of properties is easy, but for this one I'm totally lost. Any help would be appreciated.

Answer Source

You can do this,


        <th ng-repeat="(header, value) in resultData[0]">
      <tr ng-repeat="row in resultData">
        <td ng-repeat="cell in row">

Here is a sample

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download