【发布时间】:2018-10-31 07:27:34
【问题描述】:
我想汇总 For Each 每次迭代的响应。在每次迭代中,我都会获取 Json 数据,并且我想将该 Json 数据聚合到 Json Array/List 中。请告诉我如何通过在 Transform 中使用数据编织或任何其他方式来做到这一点?
以下是我在 For Each 的每次迭代中获得的示例 Json 数据。
1st iteration:
{
"accountId": "12345",
"accountNumber": "999",
"accountTitle": "ABC"
}
2nd iteration:
{
"accountId": "98765",
"accountNumber": "888",
"accountTitle": "XYZ"
}
I want final aggregated output as below.
{
accountList: [
{
"accountId": "12345",
"accountNumber": "999",
"accountTitle": "ABC"
},
{
"accountId": "98765",
"accountNumber": "888",
"accountTitle": "XYZ"
}
]
}
【问题讨论】: