Function JSON_merge()
merges two strings in JSON format into a new stirng in JSON format and returns this new string.
Arguments:
- String1 <string | text>
- String2 <string | text>
Returns:
- String <string>
Comman Usage
Example: Direct calculate
uncollect ['{"name":"Lisa"}', '{"age":23}'] as s1
uncollect ['{"birthyear":1998}', '{"industry":"education"}'] as s2
return JSON_merge(s1, s2)
| JSON_merge(s1, s2) |
|-----------------------------------|
| {"birthyear":1998,"name":"Lisa"} |
| {"age":23,"industry":"education"} |
Exalmple: Multiply and calculate
uncollect ['{"name":"Lisa"}', '{"age":23}'] as s1
uncollect ['{"birthyear":1998}', '{"industry":"education"}'] as s2
with JSON_merge(s1, s2) as s
return s
| s |
|----------------------------------------|
| {"birthyear":1998,"name":"Lisa"} |
| {"industry":"education","name":"Lisa"} |
| {"age":23,"birthyear":1998} |
| {"age":23,"industry":"education"} |