How to sort a field with custom order?

Hello,

Kindly refer to these resolved cases. It may help.

case 1 : using $switch
case 2: using if else block within $cond
case 3: using nested $cond

Case 1:

Case 2:

Case 3:

Thanks
WeDoTheBest4You

1 Like