@viktor_n thanks for the reply it worked after using JSON Formater.
Now I am trying to map the json fields in the output to different name which backend code is expecting
The input json
{
"result": [
{
"number": {
"display_value": "INC0029337",
"value": "INC0029337"
},
"short_description": {
"display_value": "test",
"value": "test"
},
"sys_id": {
"display_value": "90a4a74e1be97010ef9f6208b04bcb96",
"value": "90a4a74e1be97010ef9f6208b04bcb96"
},
"comments": {
"display_value": "thh lafldsf. legmsfd",
"value": ""
},
"state": {
"display_value": "In Progress",
"value": "2"
},
"sys_updated_on": {
"display_value": "2021-07-26 16:23:28",
"value": "2021-07-26 10:53:28"
}
},
{
"number": {
"display_value": "INC0029336",
"value": "INC0029336"
},
Here I need to map number.value → ticketNumber
short_description.display_value → description
sys_id.value → sys_id
comments.display_value → comments
state.display_value → status
sys_updated_on.value → lastUpdateTime
the final result array looks like
after re-map
{
"result": [
{
"ticketNumber": "INC0029337",
"description": "test",
"sys_id": "90a4a74e1be97010ef9f6208b04bcb96",
"comments": "hello",
"status": "In Progress", ,
"lastUpdateTime": "2021-07-26 16:23:28"
},
{
"ticketNumber": "INC0029337",
"description": "test",
"sys_id": "90a4a74e1be97010ef9f6208b04bcb96",
"comments": "hello",
"status": "In Progress", ,
"lastUpdateTime": "2021-07-26 16:23:28"
},
Mapping like this becoming very difficult. There is no Json one to one mapping. Can you pls suggest mapping logic.
thanks
arun