Convert a legacy condition/outcome value string into the config object shape.
A string that parses as a plain JSON object becomes that object (the shape the
config dialogs wrote for multi-field types such as valueMatches). Anything else,
including empty strings, JSON scalars and arrays, is kept verbatim under value.
Config: raw is the stored legacy string (any non-string is coerced by JSON.parse).
Parameters
raw: string
Legacy value string as stored on a condition or sub-condition.
Returns object
The config object to store: the parsed JSON object, or { value: raw }.
Convert a legacy condition/outcome
valuestring into theconfigobject shape.A string that parses as a plain JSON object becomes that object (the shape the config dialogs wrote for multi-field types such as
valueMatches). Anything else, including empty strings, JSON scalars and arrays, is kept verbatim undervalue.Config:
rawis the stored legacy string (any non-string is coerced byJSON.parse).