I have a data table which represents some information about user authorization. At the head of the table there are action types such as:
Insert
Update
Select
Delete
Approve
Full Control
Deny
At the left side of the table there are names for the action types. For instance when the user clicks for Insert and Update on the first row which is (Organization) new array is populated.
What i want to ask is, is there a better way to achieve the same output? I think the code looks messy because of using nested angular.forEach
Thanks in advance.
Try after flattening the dataset, and then working with the flattened view.
Hence the final results ends up with a structure like follows:
The following function was used for flattening:
Plunk: http://plnkr.co/edit/XFPuSQnRwe2YgB6EtfHa?p=preview