02-28-2022 04:21 AM
02-28-2022 05:11 AM
Hi @deepanshu.1,
I’ve managed to do this using only one Mapper snap, but in addition I used a Group By N Snap with the Group size set to 0 before the Mapper, and a JSON Splitter afterwards.
Here’s the expression:
And here’s the pipeline:
SampleWeatherAPIResponseMap_2022_02_28.slp (10.9 KB)
BR,
Aleksandar
02-28-2022 08:56 AM
Dear Aleksandar,
Thanks for the reply but I am facing issue below:
BR,
Deepanshu
02-28-2022 12:53 PM
Hi @deepanshu.1 ,
Can you please attach the output of the REST API (I suppose it is in JSON format) ?
Cheers,
Marjan
02-28-2022 10:37 PM
Hi Marjan,
Below is the output:
[
{
“group”:[
{
“location”:
“Konstanz”
“temp”:
269.63
“pressure”:
1028
“humidity”:
82
}
{
“location”:
“India”
“temp”:
305.49
“pressure”:
1013
“humidity”:
15
}
{
“location”:
“Novinki”
“temp”:
265.38
“pressure”:
1035
“humidity”:
87
}
{
“location”:
“Ptitsefabrika”
“temp”:
283.25
“pressure”:
1018
“humidity”:
80
}
]
}
]
Regards,
Deepanshu