I’m trying to pass an array contained in a Webhook call to a HTTP request module, but I need to change the array/collection/key names before doing so.
This is the relevant array contained in the webhook call:
"packages": [
{
"name": "Package 1",
"weight_in_oz": 4,
"width": 12,
"length": 15,
"height": 4,
},
{
"name": "Package 2",
"weight_in_oz": 1.08,
"width": 8,
"length": 12,
"height": 2,
}
]
I need the array to look like this:
"shipments": [
{
"parcel": {
"weight": "10.2",
"length": "6",
"width": "6",
"height": "4"
}
},
{
"parcel": {
"weight": "10.2",
"length": "6",
"width": "6",
"height": "4"
}
}
]
Following this post, when I use Parse JSON and Aggregate to JSON I only get a single collection instead of 2.