Forum Discussion

Prajwal's avatar
Prajwal
New Contributor II
2 years ago
Solved

Structuring the Data receiving from the Union snap

Hi all,

Can anyone help me to figure out how can I format the data in more structural manner?

Input Data:

[

  {

    "account_name": "Prajwal",

    "Name": "Jhonson Inc.",

    "OwnerId": "0052w00000BUhAGAA1",

    "StageName": "Negotiation/Review",

    "CloseDate": "2024-07-15",

    "Description": "Renewal contract for XYZ Inc. with added services.",

    "campaign_name": "Navya-Snaplogic"

  },

  {

    "Campaign_Id": "701Ig000000xF3BIAU"

  },

  {

    "AccountId": "0012w000027SrONAA0"

  }

]

Expected output data:

[

  {

    "account_name": "Prajwal",

    "Name": "Jhonson Inc.",

    "OwnerId": "0052w00000BUhAGAA1",

    "StageName": "Negotiation/Review",

    "CloseDate": "2024-07-15",

    "Description": "Renewal contract for XYZ Inc. with added services.",

    "campaign_name": "Navya-Snaplogic",

    "Campaign_Id": "701Ig000000xF3BIAU",

    "AccountId": "0012w000027SrONAA0"

  }

]

the campaign_id and accountid should be incorporated into the first object.

Thank you for your help!

Prajwal