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")
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")
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")
productId
property in var1.
Output: {"productId":34}
.
Recommendation
- Learn how to add and configure a Data Mapping task