Params: pass an array of strings

Question - is it possible to pass an ARRAY of strings as a param for a query? For example, I want to provide several “user_id” values and filter the results so that only those that match one of these are returned, would that work?

1 Like

To pass an array of strings, pass it as a valid JSON string and then use JSON_PARSE on the incoming parameter in your query to turn it into an array.

in your exp, you can’t parameterize ‘IN’ - Instead, use ARRAY_CONTAINS( json_parse(:my_param) , user_id)