As shown in the code below, I have an array and i push object inside in a loop. what I am trying to do is, sort it according to the value of delay property. I used the following code:
delayOfFeatures.sort((a, b) => a.delay - b.delay);
but the array does not change
code:
delayOfFeatures.push({ progSpace: progSpace, feature: feature, delay: delay });