I have an input JSON below which I want to transform it into another JSON structure:
Input JSON
{
data={
schema=81Ze2hDYGKOQYW02LVtUMQ,
payload={
value__c=500,
reference__c=00001503PM,
CreatedById=0051x000003SQ9eAAG,
originalReference__c=882595596510490G,
currency__c=SEK,
CreatedDate=2020-09-10T15:16:57.175Z,
merchantAccount__c=Hastens_eCom_Test
},
event={replayId=18188}
},
channel=/event/Capturepayment__e
}
and I want to transform it into the format below.
Output JSON
{
"originalReference": "882595596510490G",
"modificationAmount": {
"value": 500,
"currency": "SEK"
},
"reference": "00001503PM",
"merchantAccount": "Hastens_eCom_Test"
}