12-20-2022 03:16 AM
Currently we have json data like this :
{
“Test”: “1”
“SerialNumbers”: {
“SerialNo”: [
“123”,
“456”
]
}
The desired output is like this:
{
“Test”: “1”
“SerialNumbers”: [
{“SerialNo”: “123”},
{“SerialNo”: “456”}
]
}
Is there any function we could use to achive this in SnapLogic ?
Solved! Go to Solution.
12-20-2022 04:29 AM
Hi there @Igor_Bozhinovski ,
I believe the following expression will give you the desired output:
$SerialNumbers.SerialNo.map(x=>{"SerialNo":x})
12-20-2022 04:29 AM
Hi there @Igor_Bozhinovski ,
I believe the following expression will give you the desired output:
$SerialNumbers.SerialNo.map(x=>{"SerialNo":x})