I need to display data in a angular Mat data table that are coming from the API.
Before showing it, I want to filter 3 data records and display the top ones.
As an example
data = [ ['Admin user', '12'], ['Test User ', '2'], ['System user', '5'], ['Default user ', '66'], ['Jane user', '77'], ['Thomas', '77'] ]
From the above array, I need to show the system user first and then the default user and then the rest. How can I do that
The output should be in the following order
A header | Another header |
---|---|
System User | 5 |
Default User | 66 |
Jane User | 77 |
Admin user | 77 |
.. after rest