To resolve an object property just use a dot in the expression.
For example:
${person.name}
In this example first we are resolving a
person object and then it's
name property.
If the
person object doesn't such property expression will be evaluated to
undefined value.
You can also resolve deeper object properties:
${person.address.street}
Property name can be also provided dynamically as nested nexl expression:
${person.${prop}}
In this example the
${prop} expression must be evaluated to the primitive
data type or array of primitives.
In case of array nexl will multiple the result
according to the
prop array.
If the
${prop} expression is evaluated to
undefined value nexl will
ignore this property resolution operation.
To avoid such situation apply an empty default value for
${prop} expression:
${prop@}
The final expression will look like this:
${person.${prop@}}
That means if the
prop variable is
undefined, nexl will apply an empty
string value for the property resolution.
On the other hand the
person object doesn't have an empty string field.
As a result the
${person.${prop@}} expression will be evaluated to
undefined value.