Start a new topic

Check if the a value is an array.

In some cases, f.e. recieve an xml on a webhook, it is neccesary sometimes to check if a value is an array. This can be done by a Value condition with a mapped condition. In this example we check if "TransactionLines.TransactionLine is an array and if not. Make an array out of it.

First a conditional tranformer with the check


Then The transfomer if it is not an array


You can also use an value setter with jmespath. If you use the type() function it will return the type of the result of the expression.

Another option, you can use "Type: Array" as condition.

Login or Signup to post a comment