Forum Discussion

akarsh's avatar
akarsh
New Contributor III
2 years ago
Solved

Convert the Data to nested Json Document

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.

  • 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.