看不到列表输出
输入xml:
view definition
DataWeave脚本:
users
答案 0 :(得分:1)
以下Dataweave代码应该起作用:
%dw 2.0
output application/json
---
extendedNote: payload..*expandedNote map
{
"expandedNoteDateTime": $.createTimeStamp,
"expandedNoteType": $.noteType,
"expandedNoteText": $.noteText
}
输出:
{
"extendedNote": [
{
"expandedNoteDateTime": "2019-09-11T14:14:00.000-05:00",
"expandedNoteType": "Discharge",
"expandedNoteText": "test discharge 2"
},
{
"expandedNoteDateTime": "2019-09-11T14:01:00.000-05:00",
"expandedNoteType": "Discharge",
"expandedNoteText": "test discharge notes"
}
]
}