I'm trying to get create a fuzzy search for a list of data from a query.
I'm using a transformer to take the results of my query and search them based on the client_name field (I adapted the code from the Mobile App Tutorial).
Looks like your clients constant is not array. You may want to wrap it in formatDataAsArray function. And then formatDataAsObject back (see code below).
Also, as @iiLaw mentions, better assign clientSearch to a separate variable (I'm not sure how these transformers work myself).
So your result transformer code may look like this:
Woops missed that formatDataAsArray is must that's what's causing the error
Transform are a bit odd as the get triggered by any change of state of linked (or what you might call input vars/objects/query etc)