โ02-28-2022 04:21 AM
โ02-28-2022 11:11 PM
Hi @deepanshu.1 ,
Please try with the following in the mapper and let me know if it helps you:
$.group.map((x,index)=> {โLocationโ:x.location, โTempโ:x.temp -273.15, โTemp_Orderโ:jsonPath($, โgroup[].temp").sort((a,b)=>a-b).indexOf(x.temp)+1, โPressโ:x.pressure, โPress_Orderโ:jsonPath($, "group[].pressureโ).sort((a,b)=>a-b).indexOf(x.pressure)+1, โHumidityโ:x.humidity, โHumidity_Orderโ:jsonPath($, โgroup[*].humidityโ).sort((a,b)=>a-b).indexOf(x.humidity)+1})
BR,
Marjan
โ02-28-2022 11:37 PM
Dear Marjan,
I am getting the below error:
Could not compile expression: $.group.map((x,index)=> {โLoca โฆ (Reason: Invalid token: โโโ for expression: $.group.map((x,index)=> {โLoca โฆ; Resolution: Please check expression syntax)
Br,
Deepanshu
โ02-28-2022 11:39 PM
Hi @deepanshu.1 ,
Please replace quotation marks โ and โ with " in the expression in mapper.
BR,
Marjan
โ02-28-2022 11:50 PM
It should look like this:
I donโt know why the editor is replacing the symbol * and the quotation marks.
BR,
Marjan
โ02-28-2022 11:47 PM
Hi @deepanshu.1,
Also you can try to insert the asterisk symbol โ*โ in between the marked square bracket on the picture below:
BR,
Aleksandar