โ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})