Forum Discussion
bojanvelevski
4 years agoValued Contributor
Hey @vaidyarm,
Use the following expression in a mapper to get the expected result:
$array.map((x,index)=>{"value":x,"index":index}).filter(x=>x.value==($array.sort((a,b)=>b-a)[0]))
This will produce an array of objects, which will contain the max value, and It’s corresponding index.
Input:
Output:
- bojanvelevski4 years agoValued Contributor
I think you’re facing an Environment Variable problem. The Keytool execution file should be in the bin folder of your java directory which you need to make sure that it is added in the Path variable.
Related Content
- 2 years ago
- 2 years ago
- 3 years ago