The argument to $size must be an array but was of type string

Lab - Computing fields

When i try to run a query using $size, i get error “the argument to $size must be an array but was of type string”
though title field is passed as array

any help ?

are you using it like this?

$size: { $split: [’$title’, ’ '] }

Hi,

As @williammartinez suggested, in this case you have to use an operator which returns an array, like $split does.

José Carlos