Multiselect.value returns an object instead of an array

I'm trying to create a filter with multiselect. Here's the where condition of the SQL query:

or cast(ta.id as text) ilike {{ '%' + accountFilterInput.value + '%' }}
  and ({{!accountCountryMultiselect.value.length}} or ta.country_id in ({{!accountCountryMultiselect.value.length ? '' : accountCountryMultiselect.value}}))
limit {{accountsTable.pageSize}}
OFFSET {{tiktokAccountsTable.paginationOffset}}

When I typed the accountCountryMultiselect.v the editor shows that accountCountryMultiselect.value is an array. However, as I hover the SQL prepared statement, I got the following screenshot:

Screenshot 2023-03-04 at 00.37.54

Another indication that accountCountryMultiselect.value is an object instead of an array is I get the following error:

Appreciate any help here. Thank you

Try using ta.country_id = ANY(accountCountryMultiselect.value) instead of IN.

Secondly, I see you may want {{!accountCountryMultiselect.value}} or instead of {{!accountCountryMultiselect.value.length}}