I have created an array.
sample:
[
{
title: "RandomTitle",
distance: 600
},
{
title: "RandomTitle",
distance: 480
},
{
title: "RandomTitle",
distance: 500
}
]
Is it possible to get the objects in the array to be sorted based on the lowest distance value to the highest?
I am making a for loop where I display content in a div and I want it to show the nearest locations to users input.
lite version of my code: http://codepen.io/anon/pen/MKwqMv?editors=101