I am a newbie to AngularJS and HTML, sorry if these questions are very basic . I am trying to create a HTML table using ng-repeat by parsing an JS array. The sample data is given below
sample record:
data:{"acceptable":12,"run2":{"avg":0,"percent":0},"run1": {"avg":"9.337","percent":"10.401"},"trname":"ESSCreateIncident","target":8},
- Require to use ng-repeat to dynamically build an HTML Table like the one given below, in the same order. The below code which i tried is static and will not work if there additional parameters to it.
ng-repeat="row in data" {{row.trname}} {{row.target}} {{row.acceptable}} {{row.count}}
There could be multiple runs like run3, run4 etc, which has multiple variables in it.
- Also i am pushing data into these arrays in different order, but i believe they are sorted alphabetically as shown above. i need them in the order which is given in the image or the the order they are pushed in.