Escape a character in variable name parsing? #102
-
I am dealing with a bunch of externally provided key-value pairs and attempting to define rules to generate new pairs from them. One key unfortunately contains a hyphen: "{'contains-pii': false}". Hyphens are not valid characters in variable names for the rules engine parser. The rules engine recognizes the string as a key-value pair, but if I try to evaluate the token contains-pii it is interpreted as "contains - pii", a math expression. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No, you'd need to wrap the values in a hash and access them as string keys. |
Beta Was this translation helpful? Give feedback.
No, you'd need to wrap the values in a hash and access them as string keys.