Modify a resource property: String functions
It is possible to apply string manipulation functions. To specify a function, pass a JSON object as the value, with the properties :
$values
(or$value
): a single value or an array of values (almost always strings)$stringhandling
: the name of the function (case insensitive)
Function append
With this function, we concatenate the specified values after the current value.
Example:
"property": {
"$values": ["b", "c"},
"$mode": "append"
}
before: a
after: abc
Function prepend
With this function, we concatenate the specified values before the current value.
Example:
"property": {
"$values": ["b", "c"},
"$mode": "prepend"
}
before: a
after: bca
Function appendln
With this function, we concatenate the specified values after the current value, by inserting a line break between each value.
With this function, we concatenate the specified values after the current value.
Example:
"property": {
"$values": ["b", "c"},
"$mode": "appendln"
}
before: a
after:
Function prependln
With this function, we concatenate the specified values before the current value.
Example:
before: a
after:
Function replace
This function allows to replace a value by another one, using mappings. The values are objects whose properties are the strings to be replaced and their values the replacement strings.
Example:
before: a
after: c
Function replaceeach
This function allows to replace all occurrences of strings within the current string.. The values are objects whose properties are the strings to be replaced and their values the replacement strings.
Example 1:
before: abcde
after: wcte
Example 2:
before: abcde
after: dcte