I have the following list.
ID AllStatuses
1001 {failed|processing|success}
1002 {failed}
1003 {success|failed}
1004 {processing|success}
1005 {failed|processing}
My requirement is to display the most optimistic status alone. Like so
ID Best Status
1001 success
1002 failed
1003 success
1004 success
1005 processing
Is there a way I can do this with one regex query rather than say check for each one in order and return where i'd have a worst case scenario of three regex checks for statuses with the most optimistic status in the end?