How to order with 3 fields in mongoDB?

I have the following problem, I have to do a sortBy to a mongo DB collection, but with 3 types of fields that are type int / number.

I currently have the query

await Products.find({}).sort({ miShopPrice: -1, discountPrice: -1, normalPrice: -1 })
but this returns me:
    [
        {
          "normalPrice": 250,
          "miShopPrice": 100,
          "discountPrice": 0
        },
        {
          "normalPrice": 64990,
          "miShopPrice": 0,
          "discountPrice": 0
        },
        {
          "normalPrice": 19500,
          "miShopPrice": 0,
          "discountPrice": 0
        },
        {
          "normalPrice": 1600,
          "miShopPrice": 0,
          "discountPrice": 0
        }
]

mcdvoice
the condition is as follows

if you have miShopPrice and normalPrice -> myShopPrice
if you have miShopPrice and discountPrice -> myShopPrice
if you have discountPrice and normalPrice -> discountPrice
if you only have normalPrice -> normalPrice

what the query should return would be this:

    [
        {
          "normalPrice": 64990,
          "miShopPrice": 0,
          "discountPrice": 0
        },
        {
          "normalPrice": 19500,
          "miShopPrice": 0,
          "discountPrice": 0
        },
        {
          "normalPrice": 1600,
          "miShopPrice": 0,
          "discountPrice": 0
        },
        {
          "normalPrice": 250,
          "miShopPrice": 100,
          "discountPrice": 0
        }
]

could you help me I would really appreciate it

Hello

If you want to keep the original prices,and just pick a sorting order,you can use many fields.

If you want to calculate a price based on some logic,and then sort based on it,
you can aggregate on that documents,and use aggregation operators.

if (for the rules)
https://docs.mongodb.com/manual/reference/operator/aggregation/cond/

to check if a field is missing and decide
https://docs.mongodb.com/manual/reference/operator/aggregation/type/

to add the final price,in which you will sort
https://docs.mongodb.com/manual/reference/operator/aggregation/addFields/