Matching multiple array items?

I’m new to Glide and have been digging through the documentation and this forum while trying to put together my app. I’ve got a slightly tricky question…

Basically, I want to do some tag-like filtering of a table. Each item in the table has a column that holds a set of tags assigned to it (comma-delimited text, maybe with a separate column to split it into an array of tags), and I want to construct a view where the user can select multiple tags and filter the table to show only items that include ALL of those tags (where my search is also captured in a comma-delimited text column, again maybe with a separate column to split it into an array of tags).

So for example, let’s say I have a table of animals and I have tags: LEGS, TAIL, and FUR. I might have tagged table entries for Fish (tags: TAIL), Elephant (tags: LEGS, TAIL), and DOG (tags: LEGS, TAIL, FUR). If the user goes to the filter form and chooses LEGS and TAIL, it should filter the table to show Elephant and Dog, but not Fish.

The problem I have is that I can’t figure out a way to filter based on this sort of array comparison, where I want to see if the elements of List A (the split tags column of Animals) contains ALL of the elements of List B (the split tags the user has chosen).

I could of course use separate columns for each one of the tags (each a boolean perhaps) and then do a more simple set of comparisons, but I’m really trying to avoid this approach because I need to support a quite large, and expanding, set of potential tags.

Any ideas?

Below is a template that I created a few years ago that demonstrates an approach to this. Might give you some ideas.