Hi Everybody,
Need help. The request is of JSON type shown below, it has an array called billNumbers which is dynamic (can have 0 or more bill numbers in it).
{
"transactionSequenceId": "TEST4323523",
"mainDiscountPercentage": 0,
"interestDiscountPercentage": 0,
"fineDiscountPercentage": 0,
"sendFirstInstallmentEmail": false,
"token": "RkFMVkVT",
"billNumbers": [
{ "billNumber": "inv-123"},
{ "billNumber": "inv-789"}
]
}
I have managed to extract the billNumbers Array using the Extract Variables policy as shown below in two ways:-
<JSONPayload>
<Variable name="billNumbers" type="array">
<JSONPath>$.billNumbers</JSONPath>
</Variable>
<Variable name="SList">
<JSONPath>$.billNumbers[*]</JSONPath>
</Variable>
</JSONPayload>
I need to further add this array in Assign Message policy of SOAP XML to send it to the backend service which accepts soap xml type.
Like the parameter token is added this way --> <token>{token}</token>
But i dont understand how the same can be done for billNumbers array. Could anybody please tell me how I can do this?