Forum Discussion
Hi @viktor_n , thanks for reply
The Json Spliter splits the array, but it removes the array name in the output like below.
[{
“number”: “INC0029337”,
“short_description”: “test”,
“sys_id”: “erewrwer”,
“comments”: “”,
“state”: “2”,
“sys_updated_on”: “2021-07-26 10:53:28”
},
{
“number”: “INC0029336”,
“short_description”: “testing 2nd incident”,
“sys_id”: “dfdsg”,
“comments”: “”,
“state”: “2”,
“sys_updated_on”: “2021-07-26 10:52:34”
}]
But the expected response should be like
{
“result”: [{
“number”: “INC0029337”,
“short_description”: “test”,
“sys_id”: “fsdfsdgsdg”,
“comments”: “”,
“state”: “2”,
“sys_updated_on”: “2021-07-26 10:53:28”
},
{
“number”: “INC0029336”,
“short_description”: “testing 2nd incident”,
“sys_id”: “sdgssf”,
“comments”: “”,
“state”: “2”,
“sys_updated_on”: “2021-07-26 10:52:34”
}
]
}
I tried to rap this using toObject but did not work. I guess snaplogic removing array name, but our backend code is expecting the response as “result” array of objects.
thanks
arun