- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 01:13 AM - edited ‎01-16-2024 01:13 AM
My Input looks like this.
[
{
"error": "",
"stacktrace": "",
"reason": "",
"resolution": "",
"status_code": "",
"statusCode": 404,
"snap_details": {
"label": "",
"instance_id": "",
"class_id": "",
"build_tag": ""
},
"External_id__c": ""
}
]
I have to send the output in below format,
{ "External_id__c": "", "status": "", "updatedTime": "", "error": { "statusCode": "", "error": "" } }
Can anyone help me here.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 01:57 AM
Hello @akarsh.
You can try by using Mapper with the following Mapping table:
Here I assume that as updatedTime you want to take the current time, if your requirement differs, just remap it correspondingly. 🙂
Let me know if this helps you.
Regards,
Aleksandar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 01:57 AM
Hello @akarsh.
You can try by using Mapper with the following Mapping table:
Here I assume that as updatedTime you want to take the current time, if your requirement differs, just remap it correspondingly. 🙂
Let me know if this helps you.
Regards,
Aleksandar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 02:18 AM
I tried that but getting below error. anything I am doing wrong here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 03:20 AM
It is because upstream of the Mapper Snap, you have the error field as string and you are trying to pass it through but in the same time you are mapping it to an object in the Mapper Snap.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 08:13 PM
Yes that was the Issue, Thanks a lot @Aleksandar_A