Return if array empty

The first case should be

[{
'respuestas': {
$in: respuestas
}
},
...]

You’re using the old formatting, check out the updated filter docs here the relevant code snippets are in the dropdown areas with the note about the qs library.