Sort map based on object property while keeping key
<p>I have created a map that contains a list of products, and the shop closest by that is selling that product, like so:</p>

<pre><code>var products = new Map()
products.set('product_key', {
  shop: 'shop_key',
  distance: 1.2
})
</code></pre>

<p>Now what I would like to do is sort the entire map on the distance property, so that I can list the products by proximity to my location.</p>

<p>I use a map because I also need to go in and be able to find the distance to one specific product using the key.</p>