I am trying to apply a filter in below schema/response.
Here is the odata filter - ?$filter=data/pages/en_US/key in (‘black’)
However, the filter is returning all the data from pages array (in the below ex - I am passing a black filter however key having blue is also available in the response). Expecting only the data containing the key passed from the filter.
Can anyone suggest the correct way to filter the data in the below structure?
schema -
{
“previewUrls”: {},
“properties”: {
“validateOnPublish”: false
},
“scripts”: {},
“isPublished”: true,
“fieldRules”: [],
“fieldsInLists”: [],
“fieldsInReferences”: [],
“fields”: [
{
“name”: “pages”,
“properties”: {
“isRequired”: false,
“isRequiredOnPublish”: false,
“isHalfWidth”: false,
“fieldType”: “Components”,
“schemaIds”: [
“0925ffad-1e71-4217-a79b-5f483417779b”
]
},
“isLocked”: false,
“isHidden”: false,
“isDisabled”: false,
“partitioning”: “language”
}
],
“type”: “Default”
}
api response - ?$filter=“data/pages/en_US/key in (‘black’)”
{
“total”: 1,
“items”: [
{
“id”: “”,
“createdBy”: “”,
“lastModifiedBy”: “”,
“data”: {
“pages”: [
{
“key”: “blue”,
…
},
{
“key”: “black”,
…
}
]
}
}
]
}