Checking for existence of an array in a mapper
Hello. Im looking for a way of dealing with JSON documents that are sometimes recognised as an array, and sometime not. In the below example, i need to manipulate the “message” element to remove certain messages before passing these on to another web hook. We have achieved this using routers to check for the existence of an array, and they join back. However we need this as an ultra pipeline, so cannot use a join.
the current solution looks like this…
essentially what i am going here is copying the document, routing, array or non array, manipulating and joining back. I need to be able to do all this in a single path in a series of mappers, without using a join. Any help would be greatly appreciated.
Thanks for your reply. My root element was wrong. I was able to get this work by changing it.
Thanks,
Murugan