Use string functions in rules to manipulate text strings in asset JSON at runtime.
For instance, a string function can replace all occurrences of one string with another or convert strings from uppercase to lowercase. If a user enters a dashboard title in the wizard using all lowercase letters, the string function changes the text to sentence case at runtime.
toUpperCase
Parameters: Object
Returns: Object
Recursive: Supported
Description: Converts all characters in an object to uppercase. The object can be a single string or a JSON object with multiple strings
Description: Replaces the first substring of this string that matches the given regular expression.
split
Parameters: Object obj, String regex
Returns: Object
Recursive: Supported
Description: Parses a string and splits it into an array defined by the specified delimiter. For example:
1${string:split('one:two:three', ':')}
Results in array of strings:
1['one','two','three']
If more complex regular expression matching is required, use match (next).
match
Parameters: Object obj, String regex
Returns: Object
Recursive: Supported
Description:
Performs complex regular expression matching and returns an array of matching results. For example, to capture items surrounded by square single quote and square brackets: