I am looking to create a dynamic matrix table using Angular 2 that displays test results in a specific format:
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 example data demonstrates the structure I am aiming for. The JSON data can vary in size, with the possibility of having more tests than just 3. Here is an example of 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
}]
}];
Any assistance on how to achieve this would be greatly appreciated.