Checking if element in tag, statically

Hello, trying to implement something where i want to check if an enchantment is in a certain tag (the data structure as [.json] not entity tags) in the scripting language

Is there a simple ish way to do something equivalent to

if <domain>:<enchantment> in #<domain>:<tag_name> execute ...

Of course it would execute with the same result every time, as long as the tag is not modified and reloaded.

It's for the sake of configurabillity / customization from the user end

Continue to help post