Forum Discussion

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

Nest the document under another document

I have the data in below format

{
"assetguid" : "12345",
"sfdcid" : "02i79000003OFcKAAW",
"status" : "SUCCESS",
"updatedTime" : "2024-04-04T09:25:43.771Z"
}

I need to convert it to this format with out group by snap. is it possible?

[
{
"sfdcAssetResponseSdo" : [
{
"assetguid" : "F81790C2-B986-F4C9-2806-ADDE3C1E8CB5",
"sfdcid" : "02i79000003OFcKAAW",
"status" : "SUCCESS",
"updatedTime" : "2024-04-04T09:25:43.771Z"
}
],
"pipeline" : "CREATION"
}
  • Hello akarsh,

    Try with the following mappings in a Mapper Snap:

     

    And let me know if this helps you!

    Regards,

    Aleksandar.

3 Replies

  • Hello akarsh,

    Try with the following mappings in a Mapper Snap:

     

    And let me know if this helps you!

    Regards,

    Aleksandar.

    • akarsh's avatar
      akarsh
      New Contributor III
      Hi Aleksandar_A  it almost there but  I need it inside a list. it gives the below output.
      {
      "sfdcAssetResponseSdo": {
      "assetguid": "B69B0A94-FAFA-E8DE-7895-24E07E3BA500",
      "status": "FAILURE",
      "error": "error"
      },
      "pipeline": "ERROR"
      }
      • akarsh's avatar
        akarsh
        New Contributor III

        Ignore the above message please, I missed the brackets