How can I create a dynamic matrix table in Angular 2?
The matrix should look like this:
Test1 Test2 Test3
A 1,5 1,8 1,6
B 1,8 1,6 1,9
C 1,6 1,6 1,8
This is just an example data. The size of the json is dynamically. I can have more tests than 3. my Json:
data = [{
"test": "Test1",
results: [{
"env": "A",
"result": 1,5
}, {
"env": "B",
"result": 1,8
}, {
"env": "C",
"result": 1,6
}]
}, {
"test": "Test2",
results: [{
"env": "A",
"result": 1,5
}, {
"env": "B",
"result": 1,7
}, {
"env": "C",
"result": 1,6
}]
}, {
"test": "Test3",
results: [{
"env": "A",
"result": 1,8
}, {
"env": "B",
"result": 1,6
}, {
"env": "C",
"result": 1,6
}]
}];
thanks in advance