I have an object with the following structure:
root_object: {
ITEM_ONE: {
order: 2,
prop_one: '123',
prop_two: '456',
},
ITEM_TWO: {
order: 1,
prop_one: '789',
prop_two: '321',
},
ITEM_THREE: {
order: 3,
prop_one: '654',
prop_two: '987',
},
}
As an end result, I will need to get the list of keys:
['ITEM_ONE', 'ITEM_TWO', 'ITEM_THREE']
BUT they need to be ordered based on the property order, which will result as:
['ITEM_TWO', 'ITEM_ONE', 'ITEM_THREE']
I prefer to use the _lodash library for this purpose, but I'm not even sure how to start with it, since the structure for the root_object is an object and not a list.