Input
{
"Ids": ["1","2","3"]
}
Output
["Ids": "1", "Ids": "2", "Ids": "3"]
Use the map() function to map each element. Note that each element in the output array is an object, which in JSON is represented between curly brackets.
%dw 2.0
output application/json
---
payload.Ids map {ids: $}
Output:
[
{
"ids": "1"
},
{
"ids": "2"
},
{
"ids": "3"
}
]