Here is my array :
var a = [];
a["P.M.L."] = 44;
a["P.CO."] = 56;
a["M.É.D."] = 10;
Now i am trying to sort the array so it looks like :
["M.É.D." : 10, "P.M.L." : 44, "P.CO." : 56]
I have tried many solutions and none of them have been successfull. I was wondering if one of you had any idea how to sort the array.
[]
syntax to access properties when they are dynamically determined. Otherwise they would be dot properties. (technically you declared it as an array, but then added additional object properties to it)[{name:'pml',val:44},{name:'pco',val:56},...]