Forum Discussion

vaidyarm's avatar
vaidyarm
Contributor
4 years ago

How to get max element of array and its corresponding index

How can we get the max element of the array with its corresponding index?

Ex : “somefield” : [1,2,2,2,2,1,1,1,1]

Max element is 2 and indexes are 1,2,3,4