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