How would you sort this array with these objects by distance. So that you have the objects sorted from smallest distance to biggest distance ?
Object { dista
Here's the same as the current top answer, but in an ES6 one-liner:
myArray.sort((a, b) => a.distance - b.distance);