输入:-
[
{
"appName": "helloworld-1"
},
{
"appName": "helloworld-2"
}
]预期输出
{
"appList": [ "helloworld-1" , "helloworld-2" ]
}有人能为我的数据编织脚本提供指导吗?
发布于 2018-02-13 16:26:40
根据DataWeave文档,您可以应用多值选择器。多值选择器返回一个数组,其中包含其键与表达式匹配的所有值。
%dw 1.0
%output application/json
---
{
appList : payload.*appName
}https://stackoverflow.com/questions/48769483
复制相似问题