I have an input of the following payload for a POST method:
{
"order": {
"Column_X": "X",
"Column_Y": "Y",
"Column_Z": "Z",
"Column_W" : {
"div_1": "some text",
"div_2": true,
"div_3": 2
}
},
"mapper": {
"A": "<order.Column_X>",
"B": "<order.Column_Z>",
"C": "Fields or text not mapped to order",
"C1": "status",
"D": {
"D1": "<order.Column_W.div_1>",
"D2": "<order.Column_W.div_2>",
"D3": "<order.Column_W.div_3>",
"D4": "<order.Column_W.div_4>"
}
}
}
Here is the expected output mapping with the order object above:
{
"A":"X",
"B":"Z",
"C":"Fields or text not mapped to order",
"C1":"status",
"D":{
"D1":"some text",
"D2":true,
"D3":2,
"D4":null
}
}
How would I approach this to solve it?