0
var masterHeadingObj = {
  'a': "e",
  'b': "d",
  'c': "c",
  'd': "b",
  'e': "a"
};

How to sort using the string value

I am expecting this

var masterHeadingObj = {
  'e': "a"
  'd': "b",
  'c': "c",
  'b': "d",
  'a': "e",
};
David
  • 208,112
  • 36
  • 198
  • 279
  • 1
    There's no array here, only an object. Are you asking how to sort the *properties* of an object? Why do you need to do that? If the order of values matters, why not use an array instead of an object? – David Jun 28 '23 at 01:09

0 Answers0