I try using $or query is not working. Please help me. Thanks
export const getAllBuilderDataModel = async ({ model, query }: getAllBuilderDataModelProps) => {
const response = await builder.getAll(model, {
fields: ‘data’,
options: { noTargeting: true },
query
})
return response
}
const query = {
‘data.resourceInfo.$or’: [
{ mainTag: { $eq: mainTag, $options: ‘i’ } },
{ tag: { $in: selectedTypes } },
{ eyebrow: { $regex: searchValue, $options: ‘i’ } },
{ description: { $regex: searchValue, $options: ‘i’ } }
]
}
const resources = await getAllBuilderDataModel({ model, query })