我尝试从输入数据中仅提取两个字段,并将其设置为变量inn mule 4
输入:
{
"Id": "a9PV00000",
"OwnerId": "00570000001c9fmAAA",
"IsDeleted": "false",
"Name": "Account",
"CreatedDate": "2020-08-05T16:08:49.000Z",
"CreatedById": "00570000001c9fmAAA",
"LastModifiedDate": "2020-08-26T13:24:33.000Z",
"LastModifiedById": "00570000001c9fmAAA",
"SystemModstamp": "2020-09-04T13:09:57.000Z",
"LastActivityDate": [],
"LastViewedDate": "2020-09-09T08:10:29.000Z",
"LastReferencedDate": "2020-09-09T08:10:29.000Z",
"Object_API_Name__c": "Account",
"Active__c": "true",
"Upload_files_attachments__c": "true",
"Delete_files_attachments__c": "false",
"Folder_Name_": "Google Drive Notes and Attachments",
"Parent_Folder_": "1oV_wWX-19ut"
}我在转换消息中使用以下表达式
%dw 2.0
output application/json
---
payload map (Sample, indexOfSamples) ->{
"name": Sample.Name,
"parentId": Sample.Parent_Folder
}但它现在起作用了。我如何才能做到这一点?
发布于 2020-09-09 18:25:02
直接访问必填字段怎么样?
%dw 2.0
output application/json
---
{
"name": payload.Name,
"parentId": payload.Parent_Folder_
}https://stackoverflow.com/questions/63808337
复制相似问题