I'm trying to sort a map by value where the values are arrays.
For example the map below:
{'let1': ['art', 'can'], 'let2': ['own', 'kit', 'dig'], 'let3': ['art', 'zero']}
I would like to sort it as:
{'let1': ['art', 'can'], 'let3': ['art', 'zero'], 'let2': ['own', 'kit', 'dig']}
Is it possible using the JavaScript sort()
method?