Generate an output Json field that is an array
An output json field may be an array, such as: "customerCode": ["CustomerCode1"],
Current mapper does not support this output automatically. This is a guideline for work around in creating the desired output.
Instructions
There are 2 ways to do the work around:
Option1: def varArray0 = """["${var0}"]"""
Uncheck Quote Value
var0 is the input value, and varArray0 is the output value.
We are “hardcoding” the brackets and quotes around the input value.
This is acceptable if there is only 1 source/input value
Screenshot:
Option2:
def varArray1 = []
var1 = '"'+var1+'"'
varArray1.add(var1.toString())Uncheck Quote Value
var1 is the input value, and varArray1 is the output value
We define varArray1 as an array/list
We are “hardcoding” the quotes around the input value.
This is useful if the input is a looping source field.
Screenshot: