Expressions and concatenation
Property reference expressions
Property reference expressions are the most common expression pattern to refer to a JSON object property using dotted syntax, object.property1
, or map access syntax, object[property]
.
Any property that begins with a letter and only contains letters, numbers or underscores can be accessed using dot notation or map access syntax, for example:
-
user.accountId
-
user.name.given
-
user['accountId']
-
user['name']['given']
If a property contains a character other than the ones mentioned previously, such as a hyphen or dollar sign, it can only be accessed using the map access syntax, for example user.name['full-name']
or providerAttributes['amountIn$']
.
Literal expressions
PingOne supports literal expressions in the form of strings, numeric values, boolean, and null.
Strings are delimited by single quotation marks. To put a single quotation mark itself in a string, use two single quotation mark characters around it. For example, '''string'''
returns 'string'
.
Numeric literals used directly in expressions must adhere to Java standards, such as adhering to min and max limits and using l
or L
for long literals. Numeric literals are also subject to the Java floating point rounding issues.
Expression type | Example |
---|---|
String in double quotes |
|
String in single quotes |
|
Numbers |
|
Boolean |
|