...
The PayloadFactory mediator provides the simplest way to work with JSON payloads. For information on the mediator, see WSO2 ESB documentation: https://docs.wso2.org/display/ESB480ESB481/PayloadFactory+Mediator. Suppose we have a service that returns the following response for a search query:
...
The Script mediator (https://docs.wso2.org/display/ESB480ESB481/Script+Mediator) in JavaScript is useful when you need to create payloads that have recurring structures such as arrays of objects. The Script mediator defines the following important methods that can be used to manipulate payloads in many different ways:
...