I need to transform a set of incoming jsons as below to a common structure at the output. The structure of the incoming jsons are as below
Input JSON 1 { "JR_ID": "1", "JR_Data": "some text" }
Input JSON 2 { "TA_ID": "1", "TA_Data": "some text" }
Input JSON 3
{ "IM_ID": "1", "IM_Data": "some text" }
..and many more
The output JSON structure is as below
Output structure
{ "OBJECT_ID": "1", "OBJECT_Data": "some text" }
The input jsons will come one at a time and the task is to dynamically map the ID field of the incoming JSON to OBJECT_ID of output JSON and same for the data field.
How can I use mule expression language or dataweave for this? Is there any other solution available?
Any help is much appreciated.