I have a table with data of playlists and each playlist has an attribute that it can be activated or not and only one playlist can be activated i want the table to show the activated playlist at first and then all the playlists after it and when adding a new data i want to push it at the top of an array so i order it by activated attribute but when adding a new playlist to the table it doesn't push it to the top of the array because it is enforced by the sorting order how can i solve that issue
I have a table with data of playlists and each playlist has an attribute that it can be activated or not and only one playlist can be activated i want the table to show the activated playlist at first and then all the playlists after it and when adding a new data i want to push it at the top of an array so i order it by activated attribute but when adding a new playlist to the table it doesn't push it to the top of the array because it is enforced by the sorting order how can i solve that issue