See the supported connectors for Application Integration.

SET_PROPERTY function

SET_PROPERTY function

Function Name Description Usage Input parameter Return value
SET_PROPERTY Adds or updates a property in a JSON object. SET_PROPERTY(value) Property name and value. A JSON object with the newly added or updated property.

Supported data type

The SET_PROPERTY function supports the following data type:

  • JSON

Example: Add a property to a JSON object

Sample data: $var1$ = {"productId":23}

Usage: $var1$.SET_PROPERTY("radio","productName")

Add a property to var1.

Output: {"productId":23,"productName":"radio"}.

Example: Add a nested property to a JSON object

Sample data: $var1$ = {"productId":23}

Usage: $var1$.SET_PROPERTY({"productName","radio"},"productDetails")

Add a nested property to var1.

Output: {"productId":23,"productDetails":{"productName":"radio"}}.

Example: Update a property in a JSON object

Sample data: $var1$ = {"productId":23}

Usage: $var1$.SET_PROPERTY("34","productId")

Update the productId property in var1.

Output: {"productId":34}.

Recommendation