Sort by array values

Hi! I need help with this use case

Documents

    {
    "values": ["value1", "value3"],
    "price": 3
    } 
    {
    "values": ["value1", "value2", "value3"],
    "price": 1
    }
    {
    "values": ["value3"],
    "price": 17
    }
    {
    "values": ["value1", "value3"],
    "price": 10
    }
    {
    "values": ["value2", "value3"],
    "price": 15
    }

I need to sort these documents by a value and then by price

for example: all with "value1" first

    {
    "values": ["value1", "value2", "value3"],
    "price": 1
    }
    {
    "values": ["value1", "value3"],
    "price": 3
    } 
    {
    "values": ["value1", "value3"],
    "price": 10
    }
    {
    "values": ["value2", "value3"],
    "price": 15
    }
    {
    "values": ["value3"],
    "price": 17
    }

It is possible?
thanks!! :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.