How Can I Use .where() Client Side in a Fuzzy/Conditional Kind of Way?

On the client side, I want to use a repeat on a list of contacts coming from a datastore and a .where() something like this:

contacts.data.where(`is_a_demo`, show_demo_data.value, "fuzzy_function")

Where by if:

How can i do that?

Note that in the actual implementation I already have a preceeding ternary condition:

some_checkbox.checked?contacts.data.several_wheres:contacts.data.several_other_wheres

So putting it in a ternary operation is going to get too complex…

And the data isn’t coming from a server action so I can’t use conditional conditions on a query!

Community Page
Last updated: