Set properties on object
Description:
Assign values to properties on a specified object. Access to these objects is restricted to those within the context, process, or item scopes.
{
"type": "object",
"action": "set",
"args": {
"properties": {
"$data.person.firstName": "John",
"$data.person.lastName": "Doe"
}
}
}
Get properties values
Description:
Retrieve the values of specified properties from process objects. The outcome will be an array where each element directly corresponds to the defined properties.
{
"type": "object",
"action": "get",
"args": {
"properties": ["$data.person.firstName", "$data.person.lastName"],
"target": "$data.results"
}
}
Delete properties
Description:
Delete properties from process objects.
{
"type": "object",
"action": "delete",
"args": {
"properties": ["$data.person.firstName", "$data.person.lastName"],
}
}
Copy properties over
Description:
Copy properties from the source object to the target object.
{
"type": "object",
"action": "copy_on_path",
"args": {
"source": "$data.person",
"target": "$data.otherPerson",
"properties": ["firstName", "lastName"],
}
}
Create empty object
Description:
Create a new object literal on a process object.
{
"type": "object",
"action": "create",
"args": {
"target": "$data.otherPerson"
}
}
Assign properties
Description:
Assign all the properties from one object to another.
This creates the properties on the target object and sets the values so that they equal the source.
{
"type": "object",
"action": "assign",
"args": {
"source": "$data.person",
"target": "$data.otherPerson"
}
}
Clone object
Description:
Duplicate an object, either entirely or selectively. If specific properties are defined, the clone will include only those; otherwise, it will be a complete copy.
{
"type": "object",
"action": "clone",
"args": {
"source": "$data.person",
"target": "$data.otherPerson",
"properties": ["firstName"]
}
}
JSON clone
Description:
This cloning method is a complete duplication, utilizing JSON parsing in the background to execute the clone.
{
"type": "object",
"action": "json_clone",
"args": {
"source": "$data.person",
"target": "$data.otherPerson"
}
}
Assert properties
Description:
Assert that a object has values for the defined properties.
{
"type": "object",
"action": "assert",
"args": {
"source": "$data.person",
"properties": ["firstName", "lastName"],
"target": "$data.isValid"
}
}