I have the following object:
{1234: "3.05", 1235: "2.03", 1236: "3.05"}
I would like to sort them by value to get something like this:
{1235: "2.03", 1234: "3.05", 1236: "3.05"}
I tried:
const sortedList = _.orderBy(myList, (value, key) => {
return value;
}, ['asc']);
The values get sorted but it is only a list of values:
{0: "2.03", 1: "3.05", 2: "3.05"}
How can I retain the keys?