jeudi 22 février 2018

find index of max value of associate array in jquery

i have an array like this,and want to find index of maximum of value .for this sample it should return c1:

      var arr={
       c1:{val: 9, x: 2, y: 0}
       c2:{val: 1, x: 3, y: 0}
       c3:{val: 6, x: 4, y: 0}
        }




Aucun commentaire:

Enregistrer un commentaire