Filter complex array of objects in Cumulocity REST Api Query language

54 Views Asked by At

I am using Cumulocity and want to filter my managedObjects by using the query language. Is it possible to filter an array of objects by properties?

For example my managedObject has the following array:

{
    "parameters": [
        {
            "tag": "parameter1",
            "value": "1"
        },
        {
            "tag": "parameter2",
            "value": "0"
        },
        {
            "tag": "parameter3",
            "value": "1"
        }
    ]
}

I want to filter all managedObject which have a parameter with the tag = 'parameter1' and value = '0'

I already tried to do it like this:

https://...&query=$filter=parameters.tag eq 'parameter1' and parameters.value eq '1'

But this gives me all managedObjects where a item in the parameters array has the tag 'parameter1' or if a item has the value '1'.

Is there any way to do this?

0

There are 0 best solutions below