Example: I’m trying to programmatically output a phrase and show the red word in red. Notice the bang (!) in the second Visibility=“{!red}”. Is this legal?
JS:
partList = [
{part: 'This word is ', red: 0},
{part: 'red', red: 1},
{part: '!' , red: 0} ]
A lot of things are legal in UX expressions, but your question isn’t actually about them. You seem to have assumed that the best solution to achieve what you needed was to render two text elements on top of each other, hiding one that doesn’t match a particular criteria.
Well, that is definitely not the way to do it, and Fuse offers a far better alternative. I present you, MatchKey (see the second example there)!