09-29-2021 03:18 AM
This issue I face a lot of times and there is no simple solution I have found so far, let me know if anyone is able to do it 🙂
Input:
{
"quotes":{
"USDAED":3.673325,
"USDAFN":63.849999,
"USDALL":124.388,
"USDAMD":476.287499,
"USDANG":1.788825,
"USDAOA":135.371665
}
}
Output :
{
"quotes":[
{"USDAED":3.673325},
{"USDAFN":63.849999},
{"USDALL":124.388},
{"USDAMD":476.287499},
{"USDANG":1.788825},
{"USDAOA":135.371665}
]
}
09-29-2021 04:11 AM
Hi @vaidyarm ,
You can do this with a simple expression in a mapper.
$quotes.entries().map(val => {...[val]})
Target path: $quotes
Input:
{
"quotes": {
"USDAED": 3.673325,
"USDAFN": 63.849999,
"USDALL": 124.388,
"USDAMD": 476.287499,
"USDANG": 1.788825,
"USDAOA": 135.371665
}
}
Result:
{
"quotes": [
{
"USDAED": 3.673325
},
{
"USDAFN": 63.849999
},
{
"USDALL": 124.388
},
{
"USDAMD": 476.287499
},
{
"USDANG": 1.788825
},
{
"USDAOA": 135.371665
}
]
}
09-29-2021 04:22 AM
Superb !!! worked exactly how I needed it, Thanks a lot !! 🙂