Javascript: Sort Object by value : <p>I have the following object: </p>

<pre><code>{1234: "3.05", 1235: "2.03", 1236: "3.05"}
</code></pre>

<p>I would like to sort them by <strong>value</strong> to get something like this:</p>

<pre><code>{1235: "2.03", 1234: "3.05", 1236: "3.05"}
</code></pre>

<p>I tried:</p>

<pre><code>const sortedList = _.orderBy(myList, (value, key) =&gt; {
        return value;
      }, ['asc']);
</code></pre>

<p>The values get sorted but it is only a list of values:</p>

<pre><code>{0: "2.03", 1: "3.05", 2: "3.05"}
</code></pre>

<p>How can I retain the keys?</p>
