【发布时间】:2021-10-27 10:27:00
【问题描述】:
任何人都可以帮忙处理这个数据编织吗?我正在尝试将这个位于“块”中的输入映射成单独的元素。我有以下有效载荷
[{
"invoiceId": [
9808,
9797
],
"items": [{
"order_item_id": [
25630,
25805]},
{
"qty": [
"1",
"1"
]
},
{
"extension_attributes": {
"credit_reason": [
"Cancelled",
"Unwanted Return"
]
}
}
],
"isOnline": true,
"notify": true,
"appendComment": true,
"comment": {
"comment": "<b>Reason:</b> Bulk Refund </br>"
},
"arguments": {
"shipping_amount": [
0,
0
],
"extension_attributes": {
"rd_creditmemo_payment_credited": 1,
"rd_send_email": 1
}
}
}
]
我正在尝试获取下面的输出,其中将块拆分为单独的条目
[
{
"invoiceId": 9808,
"items": [
{
"order_item_id": 25630,
"qty": "1",
"extension_attributes": {
"credit_reason": "Cancelled"
}
}
],
"isOnline": false,
"notify": false,
"appendComment": true,
"comment": {
"comment": "<b>Reason:</b>Bulk Refunded</br>"
},
"arguments": {
"shipping_amount": 0,
"extension_attributes": {
"rd_credittmemo_payment_credited": 1,
"rd_send_email": 1
}
}
},
{
"invoiceId": 9797,
"items": [
{
"order_item_id": 25805,
"qty": "1",
"extension_attributes": {
"credit_reason": "Unwanted Return"
}
}
],
"isOnline": false,
"notify": false,
"appendComment": true,
"comment": {
"comment": "<b>Reason:</b>Bulk Refunded</br>"
},
"arguments": {
"shipping_amount": 4.95,
"extension_attributes": {
"rd_credittmemo_payment_credited": 1,
"rd_send_email": 1
}
}
}
]
非常感谢任何帮助。提前谢谢!
【问题讨论】:
标签: arrays mapping mule dataweave mule4