string Functions

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.

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

This JSON

And the rule:

Returns:

Parameters: Object

Returns: Object

Recursive: Supported

Description: Converts all characters in a string to lowercase.

Parameters: Object obj, String oldStr, String newStr

Returns: Object

Recursive: Supported

Description: Returns a new object with all occurrences of oldStr replaced with newStr.

Parameters: Object obj, String regex, String newStr

Returns: Object

Recursive: Supported

Description: Replaces all substrings of this string that match the given regular expression.

Parameters: Object obj, String regex, String newStr

Returns: Object

Recursive: Supported

Description: Replaces the first substring of this string that matches the given regular expression.

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:

Results in array of strings:

If more complex regular expression matching is required, use match (next).

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:

Returns the following array:

Parameters: Object obj, String delimiter

Returns: Object

Recursive: Supported

Description: Creates a string from an array of strings and separates each item by the specified delimiter.