I am trying to concatenate two arrays:
arr1: [{"a":"value"}]
arr2: [{"b":"value"}]
expected result:[{{"a":"value"},{"b":"value"}}]
vars.arr1 ++ vars.arr2 gives an error when arr1 is null.
org.mule.runtime.core.api.expression.ExpressionRuntimeException: "You called the function '+' with these arguments:
1: Null (null)
2: Object
How should I handle the following scenarios:
- when both the arrays are null
- when one of the array is null.