DEEP_MERGE

Creates a new object by recursively merging two or more objects together. Where there are key collisions that last value is used.

Syntax 

DEEP_MERGE(object, object, ...)

Usage examples 

Example 1

Input

1
{
2
"object_1": {
3
"location": {
4
"city": "Dublin"
5
}
6
},
7
"object_2": {
8
"location": {
9
"country": "Ireland"
10
}
11
}
12
}

Formula

DEEP_MERGE(object_1, object_2)

Output

1
{
2
"location": {
3
"city": "Dublin",
4
"country": "Ireland"
5
}
6
}

Example 2

Input

1
{
2
"object_1": {
3
"location": {
4
"city": "Dublin"
5
}
6
},
7
"object_2": {
8
"location": {
9
"city": "Cork"
10
}
11
}
12
}

Formula

DEEP_MERGE(object_1, object_2)

Output

1
{
2
"location": {
3
"city": "Cork"
4
}
5
}

Sample Actions 

Transform
DEEP MERGE
Transform
My Action

Select an action to inspect.

You can also click "Copy actions" and paste them in your Tines story to see how they work.

Was this helpful?