Adding array to webhook body


(SatishKumar) #1

Hi i am facing one issue,

In the action before webbook i am doing a transform due to which i am getting the following array of users
"payload": {
"_value": [
i want to pass this payload._value to the rest api with out any modification.
REST API expects user list "User": [ "user1", "user2"]

on using

"body" : "{
"User": "{{ctx.payload._value}}"
it is going as "body": "{"User": "{0=xyz, 1=abc}" }"

can you help me in fixing this?

(Alexander Reelsen) #2


check out the toJson directive of mustache scripting. See


(SatishKumar) #3

thanks Alex

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.